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
ConstructorsConstructorDescriptionJavaClassPathAnalysisInputLocation(@NonNull String classPath) Creates aJavaClassPathAnalysisInputLocationwhich locates classes in the given class path.JavaClassPathAnalysisInputLocation(@NonNull String classPath, @NonNull SourceType srcType) JavaClassPathAnalysisInputLocation(@NonNull String classPath, @NonNull SourceType srcType, @NonNull List<BodyInterceptor> bodyInterceptors) Creates aJavaClassPathAnalysisInputLocationwhich locates classes in the given class path. -
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull List<BodyInterceptor>@NonNull Optional<JavaSootClassSource>getClassSource(@NonNull ClassType type, @NonNull View view) Create or find a class source for a given type.@NonNull Stream<JavaSootClassSource>getClassSources(@NonNull View view) Scan the input location and create ClassSources for every compilation / interpretation unit.@NonNull SourceTypeIf the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.inthashCode()
-
Constructor Details
-
JavaClassPathAnalysisInputLocation
Creates aJavaClassPathAnalysisInputLocationwhich 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 aJavaClassPathAnalysisInputLocationwhich 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:AnalysisInputLocationIf 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:
getSourceTypein interfaceAnalysisInputLocation- Returns:
- returns null as source type
-
getBodyInterceptors
- Specified by:
getBodyInterceptorsin interfaceAnalysisInputLocation
-
getClassSources
Description copied from interface:AnalysisInputLocationScan the input location and create ClassSources for every compilation / interpretation unit.- Specified by:
getClassSourcesin interfaceAnalysisInputLocation- Returns:
- an Autocloseable resource that must be closed!
-
getClassSource
public @NonNull Optional<JavaSootClassSource> getClassSource(@NonNull ClassType type, @NonNull View view) Description copied from interface:AnalysisInputLocationCreate or find a class source for a given type.- Specified by:
getClassSourcein interfaceAnalysisInputLocation- Parameters:
type- The type of the class to be found.- Returns:
- The source entry for that class.
-
hashCode
public int hashCode() -
equals
-