Class JavaSourcePathAnalysisInputLocation
java.lang.Object
sootup.java.frontend.inputlocation.JavaSourcePathAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
An implementation of the
AnalysisInputLocation
interface for the Java source code path.- Author:
- Linghui Luo
-
Constructor Summary
ConstructorDescriptionJavaSourcePathAnalysisInputLocation
(String sourcePath) JavaSourcePathAnalysisInputLocation
(Set<String> sourcePaths) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.JavaSourcePathAnalysisInputLocation
(Set<String> sourcePaths, String exclusionFilePath) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.JavaSourcePathAnalysisInputLocation
(SourceType srcType, String sourcePath) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.JavaSourcePathAnalysisInputLocation
(SourceType srcType, Set<String> sourcePaths) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.JavaSourcePathAnalysisInputLocation
(SourceType srcType, Set<String> sourcePaths, String exclusionFilePath, List<BodyInterceptor> bodyInterceptors) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getClassSource
(ClassType type, View view) Create or find a class source for a given type.getClassSources
(View view) Scan the input location and create ClassSources for every compilation / interpretation unit.If the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.int
hashCode()
void
setSpecifiedAsBuiltInByUser
(SourceType srcType) The method sets the value of the variable srcType.
-
Constructor Details
-
JavaSourcePathAnalysisInputLocation
Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.- Parameters:
sourcePaths
- the source code path to search in
-
JavaSourcePathAnalysisInputLocation
-
JavaSourcePathAnalysisInputLocation
public JavaSourcePathAnalysisInputLocation(@Nonnull Set<String> sourcePaths, @Nullable String exclusionFilePath) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.- Parameters:
sourcePaths
- the source code path to search in
-
JavaSourcePathAnalysisInputLocation
public JavaSourcePathAnalysisInputLocation(@Nullable SourceType srcType, @Nonnull Set<String> sourcePaths) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.- Parameters:
srcType
- the source type for the path can be Library, Application, Phantom.sourcePaths
- the source code path to search in
-
JavaSourcePathAnalysisInputLocation
Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.- Parameters:
srcType
- the source type for the path can be Library, Application, Phantom.sourcePath
- the source code path to search in
-
JavaSourcePathAnalysisInputLocation
public JavaSourcePathAnalysisInputLocation(@Nullable SourceType srcType, @Nonnull Set<String> sourcePaths, @Nullable String exclusionFilePath, @Nonnull List<BodyInterceptor> bodyInterceptors) Create aJavaSourcePathAnalysisInputLocation
which locates java source code in the given source path.- Parameters:
srcType
- the source type for the path can be Library, Application, Phantom.sourcePaths
- the source code path to search in
-
-
Method Details
-
setSpecifiedAsBuiltInByUser
The method sets the value of the variable srcType.- Parameters:
srcType
- the source type for the path can be Library, Application, Phantom.
-
getSourceType
Description copied from interface:AnalysisInputLocation
If the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType. This is the default implementation and it returns null when no source type is specified.- Specified by:
getSourceType
in interfaceAnalysisInputLocation
- Returns:
- returns null as source type
-
getBodyInterceptors
- Specified by:
getBodyInterceptors
in interfaceAnalysisInputLocation
-
getClassSources
Description copied from interface:AnalysisInputLocation
Scan the input location and create ClassSources for every compilation / interpretation unit.- Specified by:
getClassSources
in interfaceAnalysisInputLocation
- Returns:
- The source entries.
-
getClassSource
@Nonnull public Optional<JavaSootClassSource> getClassSource(@Nonnull ClassType type, @Nonnull View view) Description copied from interface:AnalysisInputLocation
Create or find a class source for a given type.- Specified by:
getClassSource
in interfaceAnalysisInputLocation
- Parameters:
type
- The type of the class to be found.- Returns:
- The source entry for that class.
-
getExclusionFilePath
-
hashCode
public int hashCode() -
equals
-