Class EclipseJavaScriptAnalysisEngine
java.lang.Object
com.ibm.wala.client.AbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
com.ibm.wala.ide.client.EclipseProjectAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
com.ibm.wala.ide.client.EclipseProjectSourceAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
com.ibm.wala.cast.js.client.EclipseJavaScriptAnalysisEngine
- All Implemented Interfaces:
AnalysisEngine
- Direct Known Subclasses:
EclipseWebAnalysisEngine
public class EclipseJavaScriptAnalysisEngine
extends EclipseProjectSourceAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractAnalysisEngine
AbstractAnalysisEngine.EntrypointBuilder -
Field Summary
Fields inherited from class EclipseProjectSourceAnalysisEngine
defaultFileExtFields inherited from class EclipseProjectAnalysisEngine
ePath, project, workspaceRootPathModifier and TypeFieldDescriptionprotected EclipseProjectPath<?, org.eclipse.wst.jsdt.core.IJavaScriptProject> protected final org.eclipse.wst.jsdt.core.IJavaScriptProjectprotected final org.eclipse.core.runtime.IPathFields 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
ConstructorsConstructorDescriptionEclipseJavaScriptAnalysisEngine(org.eclipse.wst.jsdt.core.IJavaScriptProject project, EclipseJavaScriptAnalysisEngine.BuilderType builderType) -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptEclipseProjectPathcreateProjectPath(org.eclipse.wst.jsdt.core.IJavaScriptProject project) protected CallGraphBuilder<InstanceKey> getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) getDefaultOptions(Iterable<Entrypoint> entrypoints) Get the default analysis options appropriate for this engineprotected Pair<JSCallGraph, PointerAnalysis<ObjectVertex>> getFieldBasedCallGraph(Iterable<Entrypoint> roots) getFieldBasedCallGraph(String scriptName) protected ClassLoaderReferenceprotected AnalysisScopeprotected ClassLoaderFactorymakeClassLoaderFactory(StringFilter exclusions) we don't provide a default implementation of this method to avoid introducing a dependence on com.ibm.wala.cast from this projectprotected Iterable<Entrypoint> Methods inherited from class EclipseProjectAnalysisEngine
buildAnalysisScope, getClassHierarchy, getEclipseProjectPathModifier and TypeMethodDescriptionvoidSet up the AnalysisScope objectEclipseProjectPath<?, org.eclipse.wst.jsdt.core.IJavaScriptProject> Methods inherited from class AbstractAnalysisEngine
addApplicationModulesToScope, buildCallGraph, buildClassHierarchy, buildDefaultCallGraph, defaultCallGraphBuilder, getCache, getCallGraph, getHeapGraph, getOptions, getPointerAnalysis, getScope, getSDG, isClosedWorld, performAnalysis, setClassHierarchy, setClosedWorld, setEntrypointBuilder, setExclusionsFile, setJ2SELibraries, setJ2SELibraries, setModuleFilesModifier and TypeMethodDescriptionprotected voidAdd the application modules to the analysis scope.protected 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 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
-
EclipseJavaScriptAnalysisEngine
public EclipseJavaScriptAnalysisEngine(org.eclipse.wst.jsdt.core.IJavaScriptProject project, EclipseJavaScriptAnalysisEngine.BuilderType builderType)
-
-
Method Details
-
getDefaultOptions
Description copied from interface:AnalysisEngineGet the default analysis options appropriate for this engine- Specified by:
getDefaultOptionsin interfaceAnalysisEngine- Overrides:
getDefaultOptionsin classEclipseProjectSourceAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
-
getExclusionsFile
- Overrides:
getExclusionsFilein classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
makeDefaultEntrypoints
- Overrides:
makeDefaultEntrypointsin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
makeClassLoaderFactory
- Overrides:
makeClassLoaderFactoryin classAbstractAnalysisEngine<InstanceKey, CallGraphBuilder<InstanceKey>, Void>
-
makeAnalysisScope
- Specified by:
makeAnalysisScopein classEclipseProjectAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
-
createProjectPath
protected JavaScriptEclipseProjectPath createProjectPath(org.eclipse.wst.jsdt.core.IJavaScriptProject project) throws IOException, org.eclipse.core.runtime.CoreException - Specified by:
createProjectPathin classEclipseProjectAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>- Throws:
IOExceptionorg.eclipse.core.runtime.CoreException
-
getSourceLoader
- Specified by:
getSourceLoaderin classEclipseProjectSourceAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
-
makeDefaultCache
Description copied from class:EclipseProjectSourceAnalysisEnginewe don't provide a default implementation of this method to avoid introducing a dependence on com.ibm.wala.cast from this project- Specified by:
makeDefaultCachein classEclipseProjectSourceAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
-
getCallGraphBuilder
protected CallGraphBuilder<InstanceKey> getCallGraphBuilder(IClassHierarchy cha, AnalysisOptions options, IAnalysisCacheView cache) - Specified by:
getCallGraphBuilderin classEclipseProjectAnalysisEngine<org.eclipse.wst.jsdt.core.IJavaScriptProject, InstanceKey>
-
getFieldBasedCallGraph
public Pair<JSCallGraph, PointerAnalysis<ObjectVertex>> getFieldBasedCallGraph() throws CancelException- Throws:
CancelException
-
getFieldBasedCallGraph
public Pair<JSCallGraph, PointerAnalysis<ObjectVertex>> getFieldBasedCallGraph(String scriptName) throws CancelException - Throws:
CancelException
-
getFieldBasedCallGraph
protected Pair<JSCallGraph, PointerAnalysis<ObjectVertex>> getFieldBasedCallGraph(Iterable<Entrypoint> roots) throws CancelException - Throws:
CancelException
-