Class CAstAnalysisScope
java.lang.Object
com.ibm.wala.ipa.callgraph.AnalysisScope
com.ibm.wala.cast.ipa.callgraph.CAstAnalysisScope
-
Field Summary
Fields inherited from class AnalysisScope
APPLICATION, EXTENSION, loadersByName, PRIMORDIAL, SYNTHETICModifier and TypeFieldDescriptionstatic final Atomstatic final Atomfinal LinkedHashMap<Atom, ClassLoaderReference> static final Atomstatic final Atom -
Constructor Summary
ConstructorsConstructorDescriptionCAstAnalysisScope(SingleClassLoaderFactory loaders, Collection<Language> languages) CAstAnalysisScope(Module[] sources, SingleClassLoaderFactory loaders, Collection<Language> languages) CAstAnalysisScope(String[] sourceFileNames, SingleClassLoaderFactory loaders, Collection<Language> languages) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassFileToScope(ClassLoaderReference loader, File file) Add a class file to the scope for a loaderReturn the information regarding the application loader.Return the information regarding the extension loader.intReturn the information regarding the primordial loader.Return the information regarding the application loader.toString()Methods inherited from class AnalysisScope
addInputStreamForJarToScope, addJDKModuleToScope, addSourceFileToScope, addToScope, addToScope, addToScope, addToScopeHead, classLoaderName2Ref, createJavaAnalysisScope, findMethod, getBaseLanguages, getExclusions, getExclusionString, getJavaLibraryVersion, getLanguage, getLanguages, getLoaderImpl, getModules, initCoreForJava, initForJava, initSynthetic, isApplicationLoader, isJava14Libraries, isJava15Libraries, isJava16Libraries, isJava17Libraries, isJava18Libraries, setExclusions, setExclusions, setLoaderImpl, toJson, toShallowAnalysisScopeModifier and TypeMethodDescriptionvoidaddInputStreamForJarToScope(ClassLoaderReference loader, InputStream stream) Add a jar file to the scope via anInputStream.voidaddJDKModuleToScope(String moduleName) Adds a module from the Java standard library to the analysis scope.voidaddSourceFileToScope(ClassLoaderReference loader, File file, String fileName) Add a class file to the scope for a loadervoidaddToScope(AnalysisScope other) Add all modules from another scopevoidaddToScope(ClassLoaderReference loader, Module m) Add a module to the scope for a loadervoidaddToScope(ClassLoaderReference loader, JarFile file) Add a jar file to the scope for a loadervoidaddToScopeHead(ClassLoaderReference loader, Module m) Add a module file to the scope for a loader.protected ClassLoaderReferenceclassLoaderName2Ref(String clName) static AnalysisScopeCreate an analysis scope initialized for analysis of JavafindMethod(Atom loader, String klass, Atom name, ImmutableByteArray desc) Utility function.protected ObjectgetLanguage(Atom name) getModules(ClassLoaderReference loader) protected voidInitialize the standard 3 class loaders for java analysisprotected voidInitialize a scope for java analysisprotected voidinitSynthetic(ClassLoaderReference parent) Create the class loader for synthetic classes.booleanisApplicationLoader(IClassLoader loader) booleanbooleanbooleanbooleanbooleanvoidsetExclusions(SetOfClasses classes) Deprecated, for removal: This API element is subject to removal in a future version.voidsetExclusions(StringFilter classes) voidsetLoaderImpl(ClassLoaderReference ref, String implClass) toJson()An AnalysisScope is converted to a JSON formatted variable using the loaders and exclusions hierarchy using ToJson.Creates a "serializable" version of the analysis scope.
-
Constructor Details
-
CAstAnalysisScope
-
CAstAnalysisScope
public CAstAnalysisScope(String[] sourceFileNames, SingleClassLoaderFactory loaders, Collection<Language> languages) -
CAstAnalysisScope
public CAstAnalysisScope(Module[] sources, SingleClassLoaderFactory loaders, Collection<Language> languages)
-
-
Method Details
-
getPrimordialLoader
Return the information regarding the primordial loader.- Overrides:
getPrimordialLoaderin classAnalysisScope- Returns:
- ClassLoaderReference
-
getExtensionLoader
Return the information regarding the extension loader.- Overrides:
getExtensionLoaderin classAnalysisScope- Returns:
- ClassLoaderReference
-
getApplicationLoader
Return the information regarding the application loader.- Overrides:
getApplicationLoaderin classAnalysisScope- Returns:
- ClassLoaderReference
-
getArrayClassLoader
- Overrides:
getArrayClassLoaderin classAnalysisScope- Returns:
- Returns the arrayClassLoader.
-
getSyntheticLoader
Return the information regarding the application loader.- Overrides:
getSyntheticLoaderin classAnalysisScope- Returns:
- ClassLoaderReference
-
addClassFileToScope
Add a class file to the scope for a loader- Overrides:
addClassFileToScopein classAnalysisScope
-
getLoader
- Overrides:
getLoaderin classAnalysisScope- Returns:
- the ClassLoaderReference specified by
name.
-
getLoaders
- Overrides:
getLoadersin classAnalysisScope
-
getNumberOfLoaders
public int getNumberOfLoaders()- Overrides:
getNumberOfLoadersin classAnalysisScope- Returns:
- the number of loaders.
-
toString
- Overrides:
toStringin classAnalysisScope
-
AnalysisScope.setExclusions(StringFilter)} instead.