2009-01-09 02:54:36 +00:00
|
|
|
package com.ibm.wala.cast.java.test;
|
|
|
|
|
|
|
|
|
|
|
|
import com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine;
|
2009-03-18 22:47:26 +00:00
|
|
|
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
|
2009-01-09 02:54:36 +00:00
|
|
|
import com.ibm.wala.cast.java.translator.polyglot.PolyglotJavaSourceAnalysisEngine;
|
|
|
|
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
|
|
|
|
import com.ibm.wala.ipa.callgraph.AnalysisScope;
|
|
|
|
import com.ibm.wala.ipa.callgraph.Entrypoint;
|
|
|
|
import com.ibm.wala.ipa.callgraph.impl.Util;
|
|
|
|
import com.ibm.wala.ipa.cha.IClassHierarchy;
|
|
|
|
|
|
|
|
public class PolyglotJLexTest extends JLexTest {
|
|
|
|
|
|
|
|
public PolyglotJLexTest(String name) {
|
|
|
|
super(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors) {
|
|
|
|
JavaSourceAnalysisEngine engine = new PolyglotJavaSourceAnalysisEngine() {
|
|
|
|
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha) {
|
2009-03-18 22:47:26 +00:00
|
|
|
return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE, cha, new String[] { "LJLex/Main" });
|
2009-01-09 02:54:36 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
|
|
|
|
return engine;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|