|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.client.AbstractAnalysisEngine
public abstract class AbstractAnalysisEngine
Abstract base class for analysis engine implementations Some clients choose to build on this, but many don't. I usually don't in new code; I usually don't find the re-use enabled by this class compelling. I would probably nuke this except for some legacy code that uses it.
| Nested Class Summary | |
|---|---|
static interface |
AbstractAnalysisEngine.EntrypointBuilder
|
| Field Summary | |
|---|---|
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 java.util.Collection<Module> |
moduleFiles
The modules to analyze |
protected PointerAnalysis |
pointerAnalysis
Results of pointer analysis |
protected AnalysisScope |
scope
A representation of the analysis scope |
static java.lang.String |
SYNTHETIC_J2SE_MODEL
|
| Constructor Summary | |
|---|---|
AbstractAnalysisEngine()
|
|
| Method Summary | |
|---|---|
protected void |
addApplicationModulesToScope()
Add the application modules to the analysis scope. |
void |
buildAnalysisScope()
Set up the AnalysisScope object |
protected CallGraphBuilder |
buildCallGraph(IClassHierarchy cha,
AnalysisOptions options,
boolean savePointerAnalysis,
MonitorUtil.IProgressMonitor monitor)
|
IClassHierarchy |
buildClassHierarchy()
|
CallGraph |
buildDefaultCallGraph()
|
CallGraphBuilder |
defaultCallGraphBuilder()
Builds the call graph for the analysis scope in effect, using all of the given entry points. |
AnalysisCache |
getCache()
|
protected CallGraph |
getCallGraph()
|
protected abstract CallGraphBuilder |
getCallGraphBuilder(IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache)
|
IClassHierarchy |
getClassHierarchy()
|
AnalysisOptions |
getDefaultOptions(java.lang.Iterable<Entrypoint> entrypoints)
Get the default analysis options appropriate for this engine |
java.lang.String |
getExclusionsFile()
|
HeapGraph |
getHeapGraph()
|
AnalysisOptions |
getOptions()
|
PointerAnalysis |
getPointerAnalysis()
|
protected AnalysisScope |
getScope()
|
boolean |
isClosedWorld()
|
AnalysisCache |
makeDefaultCache()
|
protected java.lang.Iterable<Entrypoint> |
makeDefaultEntrypoints(AnalysisScope scope,
IClassHierarchy cha)
|
protected void |
setClassHierarchy(IClassHierarchy cha)
|
void |
setClosedWorld(boolean b)
Specify whether the engine should or should not employ "closed-world" analysis. |
void |
setEntrypointBuilder(AbstractAnalysisEngine.EntrypointBuilder builder)
|
void |
setExclusionsFile(java.lang.String exclusionsFile)
|
void |
setJ2SELibraries(java.util.jar.JarFile[] libs)
Specify the jar files that represent the standard J2SE libraries |
void |
setJ2SELibraries(Module[] libs)
Specify the mdoules that represent the standard J2SE libraries |
void |
setModuleFiles(java.util.Collection moduleFiles)
Specify the list of modules that should be analyzed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SYNTHETIC_J2SE_MODEL
protected static final int DEBUG_LEVEL
protected java.util.Collection<Module> moduleFiles
protected AnalysisScope scope
protected Module[] j2seLibs
protected CallGraph cg
protected PointerAnalysis pointerAnalysis
| Constructor Detail |
|---|
public AbstractAnalysisEngine()
| Method Detail |
|---|
protected abstract CallGraphBuilder getCallGraphBuilder(IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache)
protected CallGraphBuilder buildCallGraph(IClassHierarchy cha,
AnalysisOptions options,
boolean savePointerAnalysis,
MonitorUtil.IProgressMonitor monitor)
throws java.lang.IllegalArgumentException,
CancelException
java.lang.IllegalArgumentException
CancelExceptionpublic void setModuleFiles(java.util.Collection moduleFiles)
AnalysisEngine
setModuleFiles in interface AnalysisEnginemoduleFiles - A non-null Collection of module files: (EARFile, WARFile, ApplicationClientFile, EJBJarFile).
public void buildAnalysisScope()
throws java.io.IOException
java.io.IOExceptionpublic IClassHierarchy buildClassHierarchy()
public IClassHierarchy getClassHierarchy()
protected void setClassHierarchy(IClassHierarchy cha)
protected CallGraph getCallGraph()
protected void addApplicationModulesToScope()
public void setJ2SELibraries(java.util.jar.JarFile[] libs)
AnalysisEngine
setJ2SELibraries in interface AnalysisEnginelibs - 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 AnalysisEnginelibs - 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 AnalysisEngineb - whether to use closed-world analysispublic boolean isClosedWorld()
protected AnalysisScope getScope()
public PointerAnalysis getPointerAnalysis()
public HeapGraph getHeapGraph()
public java.lang.String getExclusionsFile()
public void setExclusionsFile(java.lang.String exclusionsFile)
public AnalysisOptions getDefaultOptions(java.lang.Iterable<Entrypoint> entrypoints)
AnalysisEngine
getDefaultOptions in interface AnalysisEnginepublic AnalysisCache makeDefaultCache()
protected java.lang.Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,
IClassHierarchy cha)
public void setEntrypointBuilder(AbstractAnalysisEngine.EntrypointBuilder builder)
public CallGraphBuilder defaultCallGraphBuilder()
throws java.lang.IllegalArgumentException,
CancelException,
java.io.IOException
CancelException
java.lang.IllegalArgumentException
java.io.IOException
public CallGraph buildDefaultCallGraph()
throws java.lang.IllegalArgumentException,
CancelException,
java.io.IOException
java.lang.IllegalArgumentException
CancelException
java.io.IOExceptionpublic AnalysisCache getCache()
public AnalysisOptions getOptions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||