Class AnalysisScopeReader
java.lang.Object
com.ibm.wala.core.util.config.AnalysisScopeReader
- Direct Known Subclasses:
DexAnalysisScopeReader, EclipseAnalysisScopeReader, Java9AnalysisScopeReader
Reads
AnalysisScope from a text file.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringstatic AnalysisScopeReaderprotected final ClassLoader -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAnalysisScopeReader(ClassLoader myLoader, String basicFile) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassPathToScope(String classPath, AnalysisScope scope, ClassLoaderReference loader) protected booleanhandleInSubclass(AnalysisScope scope, ClassLoaderReference walaLoader, String language, String entryType, String entryPathname) makeBasePrimordialScope(File exclusionsFile) Creates an AnalysisScope containing only the JDK standard libraries.makeJavaBinaryAnalysisScope(String classPath, File exclusionsFile) makePrimordialScope(File exclusionsFile) Creates an AnalysisScope containing only the JDK standard libraries.voidprocessScopeDefLine(AnalysisScope scope, ClassLoader javaLoader, String line) read(AnalysisScope scope, String scopeFileName, @Nullable File exclusionsFile, ClassLoader javaLoader) protected AnalysisScoperead(AnalysisScope scope, URI scopeFileURI, File exclusionsFile, ClassLoader javaLoader) readJavaScope(String scopeFileName, @Nullable File exclusionsFile, ClassLoader javaLoader) read in an analysis scope for a Java application from a text fileprotected static voidsetScopeReader(AnalysisScopeReader reader)
-
Field Details
-
instance
-
MY_CLASSLOADER
-
BASIC_FILE
-
-
Constructor Details
-
AnalysisScopeReader
protected AnalysisScopeReader() -
AnalysisScopeReader
-
-
Method Details
-
setScopeReader
-
readJavaScope
public AnalysisScope readJavaScope(String scopeFileName, @Nullable File exclusionsFile, ClassLoader javaLoader) throws IOException read in an analysis scope for a Java application from a text file- Parameters:
scopeFileName- the text file specifying the scopeexclusionsFile- a file specifying code to be excluded from the scope; can benulljavaLoader- the class loader used to read in files referenced in the scope file, viaClassLoader.getResource(String)- Returns:
- the analysis scope
- Throws:
IOException
-
read
public AnalysisScope read(AnalysisScope scope, String scopeFileName, @Nullable File exclusionsFile, ClassLoader javaLoader) throws IOException - Throws:
IOException
-
read
protected AnalysisScope read(AnalysisScope scope, URI scopeFileURI, File exclusionsFile, ClassLoader javaLoader) throws IOException - Throws:
IOException
-
processScopeDefLine
public void processScopeDefLine(AnalysisScope scope, ClassLoader javaLoader, String line) throws IOException - Throws:
IOException
-
handleInSubclass
protected boolean handleInSubclass(AnalysisScope scope, ClassLoaderReference walaLoader, String language, String entryType, String entryPathname) -
makePrimordialScope
Creates an AnalysisScope containing only the JDK standard libraries. If no explicit JDK library paths are given in the WALA properties file, the scope contains all library modules for the running JVM.- Parameters:
exclusionsFile- file holding class hierarchy exclusions. may be null- Throws:
IllegalStateException- if there are problems reading wala propertiesIOException
-
makeBasePrimordialScope
Creates an AnalysisScope containing only the JDK standard libraries. If no explicit JDK library paths are given in the WALA properties file, the scope contains only thejava.basemodule for the running JVM.- Parameters:
exclusionsFile- file holding class hierarchy exclusions. may be null- Throws:
IllegalStateException- if there are problems reading wala propertiesIOException
-
makeJavaBinaryAnalysisScope
public AnalysisScope makeJavaBinaryAnalysisScope(String classPath, File exclusionsFile) throws IOException - Parameters:
classPath- class path to analyze, delimited byFile.pathSeparatorexclusionsFile- file holding class hierarchy exclusions. may be null- Throws:
IllegalStateException- if there are problems reading wala propertiesIOException
-
addClassPathToScope
-