public abstract class AbstractAnalysisEngine extends Object implements AnalysisEngine
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractAnalysisEngine.EntrypointBuilder |
Modifier and Type | Field and Description |
---|---|
protected CallGraph |
cg
Governing call graph
|
protected static int |
DEBUG_LEVEL
DEBUG_LEVEL:
0 No output
1 Print some simple stats and warning information
2 Detailed debugging
|
protected Module[] |
j2seLibs
The standard J2SE libraries to analyze
|
protected Collection<Module> |
moduleFiles
The modules to analyze
|
protected PointerAnalysis<InstanceKey> |
pointerAnalysis
Results of pointer analysis
|
protected AnalysisScope |
scope
A representation of the analysis scope
|
static String |
SYNTHETIC_J2SE_MODEL |
Constructor and Description |
---|
AbstractAnalysisEngine() |
public static final String SYNTHETIC_J2SE_MODEL
protected static final int DEBUG_LEVEL
protected Collection<Module> moduleFiles
protected AnalysisScope scope
protected Module[] j2seLibs
protected CallGraph cg
protected PointerAnalysis<InstanceKey> pointerAnalysis
protected abstract CallGraphBuilder getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache)
protected CallGraphBuilder buildCallGraph(IClassHierarchy cha, AnalysisOptions options, boolean savePointerAnalysis, MonitorUtil.IProgressMonitor monitor) throws IllegalArgumentException, CancelException
public void setModuleFiles(Collection moduleFiles)
AnalysisEngine
setModuleFiles
in interface AnalysisEngine
moduleFiles
- A non-null Collection of module files: (EARFile, WARFile, ApplicationClientFile, EJBJarFile).public void buildAnalysisScope() throws IOException
IOException
public IClassHierarchy buildClassHierarchy()
protected ClassLoaderFactory makeClassLoaderFactory(SetOfClasses exclusions)
public IClassHierarchy getClassHierarchy()
protected void setClassHierarchy(IClassHierarchy cha)
protected CallGraph getCallGraph()
protected void addApplicationModulesToScope()
public void setJ2SELibraries(JarFile[] libs)
AnalysisEngine
setJ2SELibraries
in interface AnalysisEngine
libs
- an array of jar files; usually rt.jar for vanilla JDK core.jar, server.jar, and xml.jar for some WAS runtimespublic void setJ2SELibraries(Module[] libs)
AnalysisEngine
setJ2SELibraries
in interface AnalysisEngine
libs
- an array of Modules; usually rt.jar for vanilla JDK core.jar, server.jar, and xml.jar for some WAS runtimespublic void setClosedWorld(boolean b)
AnalysisEngine
setClosedWorld
in interface AnalysisEngine
b
- whether to use closed-world analysispublic boolean isClosedWorld()
protected AnalysisScope getScope()
public PointerAnalysis<InstanceKey> getPointerAnalysis()
public HeapGraph getHeapGraph()
public String getExclusionsFile()
public void setExclusionsFile(String exclusionsFile)
public AnalysisOptions getDefaultOptions(Iterable<Entrypoint> entrypoints)
AnalysisEngine
getDefaultOptions
in interface AnalysisEngine
public AnalysisCache makeDefaultCache()
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope, IClassHierarchy cha)
public void setEntrypointBuilder(AbstractAnalysisEngine.EntrypointBuilder builder)
public CallGraphBuilder defaultCallGraphBuilder() throws IllegalArgumentException, CancelException, IOException
public CallGraph buildDefaultCallGraph() throws IllegalArgumentException, CancelException, IOException
public AnalysisCache getCache()
public AnalysisOptions getOptions()