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
Modifier and TypeFieldDescriptionprotected final String
static AnalysisScopeReader
protected final ClassLoader
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
AnalysisScopeReader
(ClassLoader myLoader, String basicFile) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClassPathToScope
(String classPath, AnalysisScope scope, ClassLoaderReference loader) protected boolean
handleInSubclass
(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.void
processScopeDefLine
(AnalysisScope scope, ClassLoader javaLoader, String line) read
(AnalysisScope scope, String scopeFileName, File exclusionsFile, ClassLoader javaLoader) protected AnalysisScope
read
(AnalysisScope scope, URI scopeFileURI, File exclusionsFile, ClassLoader javaLoader) readJavaScope
(String scopeFileName, File exclusionsFile, ClassLoader javaLoader) read in an analysis scope for a Java application from a text fileprotected static void
setScopeReader
(AnalysisScopeReader reader)
-
Field Details
-
instance
-
MY_CLASSLOADER
-
BASIC_FILE
-
-
Constructor Details
-
AnalysisScopeReader
protected AnalysisScopeReader() -
AnalysisScopeReader
-
-
Method Details
-
setScopeReader
-
readJavaScope
public AnalysisScope readJavaScope(String scopeFileName, 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 benull
javaLoader
- 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, 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 problmes 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.base
module for the running JVM.- Parameters:
exclusionsFile
- file holding class hierarchy exclusions. may be null- Throws:
IllegalStateException
- if there are problmes reading wala propertiesIOException
-
makeJavaBinaryAnalysisScope
public AnalysisScope makeJavaBinaryAnalysisScope(String classPath, File exclusionsFile) throws IOException - Parameters:
classPath
- class path to analyze, delimited byFile.pathSeparator
exclusionsFile
- file holding class hierarchy exclusions. may be null- Throws:
IllegalStateException
- if there are problems reading wala propertiesIOException
-
addClassPathToScope
-