Class JavaClassPathAnalysisInputLocation
java.lang.Object
sootup.java.bytecode.frontend.inputlocation.JavaClassPathAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
An implementation of the
AnalysisInputLocation
interface for the Java class path. Handles
directories, archives (including wildcard denoted archives) as stated in the official
documentation: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html- Author:
- Manuel Benz created on 22.05.18, Kaustubh Kelkar updated on 20.07.2020
-
Constructor Summary
ConstructorDescriptionJavaClassPathAnalysisInputLocation
(String classPath) Creates aJavaClassPathAnalysisInputLocation
which locates classes in the given class path.JavaClassPathAnalysisInputLocation
(String classPath, SourceType srcType) JavaClassPathAnalysisInputLocation
(String classPath, SourceType srcType, List<BodyInterceptor> bodyInterceptors) Creates aJavaClassPathAnalysisInputLocation
which locates classes in the given class 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()
-
Constructor Details
-
JavaClassPathAnalysisInputLocation
Creates aJavaClassPathAnalysisInputLocation
which locates classes in the given class path.- Parameters:
classPath
- The class path to search in
-
JavaClassPathAnalysisInputLocation
-
JavaClassPathAnalysisInputLocation
public JavaClassPathAnalysisInputLocation(@Nonnull String classPath, @Nonnull SourceType srcType, @Nonnull List<BodyInterceptor> bodyInterceptors) Creates aJavaClassPathAnalysisInputLocation
which locates classes in the given class path.- Parameters:
classPath
- the class path to search insrcType
- the source type for the path can be Library, Application, Phantom.
-
-
Method Details
-
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.
-
hashCode
public int hashCode() -
equals
-