Class JavaSourceAnalysisEngine
java.lang.Object
com.ibm.wala.client.AbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
com.ibm.wala.cast.java.client.JavaSourceAnalysisEngine
- All Implemented Interfaces:
AnalysisEngine
- Direct Known Subclasses:
ECJJavaSourceAnalysisEngine
public abstract class JavaSourceAnalysisEngine
extends AbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractAnalysisEngine
AbstractAnalysisEngine.EntrypointBuilder -
Field Summary
Fields inherited from class AbstractAnalysisEngine
cg, DEBUG_LEVEL, j2seLibs, moduleFiles, pointerAnalysis, scope, SYNTHETIC_J2SE_MODELModifier and TypeFieldDescriptionprotected CallGraphGoverning call graphprotected static final intDEBUG_LEVEL: 0 No output 1 Print some simple stats and warning information 2 Detailed debuggingprotected Module[]The standard J2SE libraries to analyzeprotected Collection<? extends Module> The modules to analyzeprotected PointerAnalysis<InstanceKey> Results of pointer analysisprotected AnalysisScopeA representation of the analysis scopestatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd the application modules to the analysis scope.voidAdds the given compiled module to the application loader's module list.voidAdds the given source module to the source loader's module list.voidAdds the given module to the primordial loader's module list.voidSet up the AnalysisScope objectprotected AstJavaZeroXCFABuildergetCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) protected abstract ClassLoaderFactorygetClassLoaderFactory(StringFilter exclusions) getDefaultOptions(Iterable<Entrypoint> entrypoints) Get the default analysis options appropriate for this engineprotected Iterable<Entrypoint> protected AnalysisScopeMethods inherited from class AbstractAnalysisEngine
buildCallGraph, buildDefaultCallGraph, defaultCallGraphBuilder, getCache, getCallGraph, getClassHierarchy, getExclusionsFile, getHeapGraph, getPointerAnalysis, getScope, getSDG, isClosedWorld, makeClassLoaderFactory, performAnalysis, setClassHierarchy, setClosedWorld, setEntrypointBuilder, setExclusionsFile, setJ2SELibraries, setJ2SELibraries, setModuleFilesModifier and TypeMethodDescriptionprotected CallGraphBuilder<InstanceKey> buildCallGraph(IClassHierarchy cha, AnalysisOptions options, boolean savePointerAnalysis, MonitorUtil.IProgressMonitor monitor) Builds the call graph for the analysis scope in effect, using all of the given entry points.getCache()protected CallGraphHeapGraph<?> PointerAnalysis<? super InstanceKey> protected AnalysisScopegetScope()SDG<? super InstanceKey> booleanprotected ClassLoaderFactorymakeClassLoaderFactory(StringFilter exclusions) protected IClassHierarchyvoidsetClosedWorld(boolean b) Specify whether the engine should or should not employ "closed-world" analysis.voidvoidsetExclusionsFile(String exclusionsFile) voidsetJ2SELibraries(Module[] libs) Specify the mdoules that represent the standard J2SE librariesvoidsetJ2SELibraries(JarFile[] libs) Specify the jar files that represent the standard J2SE librariesvoidsetModuleFiles(Collection<? extends Module> moduleFiles) Specify the list of modules that should be analyzed.
-
Constructor Details
-
JavaSourceAnalysisEngine
public JavaSourceAnalysisEngine()
-
-
Method Details
-
addSourceModule
Adds the given source module to the source loader's module list. Clients should/may call this method if they don't supply an IJavaProject to the constructor. -
addCompiledModule
Adds the given compiled module to the application loader's module list. Clients should/may call this method if they don't supply an IJavaProject to the constructor. -
addSystemModule
Adds the given module to the primordial loader's module list. Clients should/may call this method if they don't supply an IJavaProject to the constructor. -
addApplicationModulesToScope
protected void addApplicationModulesToScope()Description copied from class:AbstractAnalysisEngineAdd the application modules to the analysis scope.- Overrides:
addApplicationModulesToScopein classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
buildAnalysisScope
Description copied from class:AbstractAnalysisEngineSet up the AnalysisScope object- Overrides:
buildAnalysisScopein classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>- Throws:
IOException
-
makeSourceAnalysisScope
-
getClassLoaderFactory
-
buildClassHierarchy
- Overrides:
buildClassHierarchyin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>- Returns:
- a IClassHierarchy object for this analysis scope
-
makeDefaultEntrypoints
- Overrides:
makeDefaultEntrypointsin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
makeDefaultCache
- Overrides:
makeDefaultCachein classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
getOptions
- Overrides:
getOptionsin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
getDefaultOptions
Description copied from interface:AnalysisEngineGet the default analysis options appropriate for this engine- Specified by:
getDefaultOptionsin interfaceAnalysisEngine- Overrides:
getDefaultOptionsin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
getCallGraphBuilder
protected AstJavaZeroXCFABuilder getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) - Specified by:
getCallGraphBuilderin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-