Class JavaModulePathAnalysisInputLocation
java.lang.Object
sootup.java.bytecode.frontend.inputlocation.JavaModulePathAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
,ModuleInfoAnalysisInputLocation
public class JavaModulePathAnalysisInputLocation
extends Object
implements ModuleInfoAnalysisInputLocation
An implementation of the
AnalysisInputLocation
interface for the Java modulepath. Handles
directories, archives (including wildcard denoted archives) as stated in the official
documentation:- Author:
- Andreas Dann created on 28.05.18
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJavaModulePathAnalysisInputLocation
(@NonNull Path modulePath) Creates aJavaModulePathAnalysisInputLocation
which locates classes in the given module path.JavaModulePathAnalysisInputLocation
(@NonNull Path modulePath, @NonNull FileSystem fileSystem, @NonNull SourceType sourcetype) JavaModulePathAnalysisInputLocation
(@NonNull Path modulePath, @NonNull FileSystem fileSystem, @NonNull SourceType sourcetype, @NonNull List<BodyInterceptor> bodyInterceptors) Creates aJavaModulePathAnalysisInputLocation
which locates classes in the given module path.JavaModulePathAnalysisInputLocation
(@NonNull Path modulePath, @NonNull SourceType sourcetype) -
Method Summary
Modifier and TypeMethodDescriptionboolean
@NonNull List<BodyInterceptor>
@NonNull Optional<JavaSootClassSource>
getClassSource
(@NonNull ClassType classType, @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.protected Stream<JavaSootClassSource>
getClassSourcesInternal
(@NonNull ModuleSignature moduleSignature, @NonNull View view) @NonNull Optional<JavaModuleInfo>
getModuleInfo
(ModuleSignature sig, View view) @NonNull Set<ModuleSignature>
getModules
(View view) @NonNull Stream<JavaSootClassSource>
getModulesClassSources
(@NonNull ModuleSignature moduleSignature, @NonNull View view) @NonNull SourceType
If the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.int
hashCode()
-
Constructor Details
-
JavaModulePathAnalysisInputLocation
Creates aJavaModulePathAnalysisInputLocation
which locates classes in the given module path.- Parameters:
modulePath
- The class path to search in TheClassProvider
for generatingSootClassSource
es for the files found on the class path
-
JavaModulePathAnalysisInputLocation
public JavaModulePathAnalysisInputLocation(@NonNull Path modulePath, @NonNull SourceType sourcetype) -
JavaModulePathAnalysisInputLocation
public JavaModulePathAnalysisInputLocation(@NonNull Path modulePath, @NonNull FileSystem fileSystem, @NonNull SourceType sourcetype) -
JavaModulePathAnalysisInputLocation
public JavaModulePathAnalysisInputLocation(@NonNull Path modulePath, @NonNull FileSystem fileSystem, @NonNull SourceType sourcetype, @NonNull List<BodyInterceptor> bodyInterceptors) Creates aJavaModulePathAnalysisInputLocation
which locates classes in the given module path.- Parameters:
modulePath
- The class path to search in TheClassProvider
for generatingSootClassSource
es for the files found on the class pathfileSystem
- filesystem for the path
-
-
Method Details
-
getModuleInfo
- Specified by:
getModuleInfo
in interfaceModuleInfoAnalysisInputLocation
-
getModules
- Specified by:
getModules
in interfaceModuleInfoAnalysisInputLocation
-
getClassSources
Description copied from interface:AnalysisInputLocation
Scan the input location and create ClassSources for every compilation / interpretation unit.- Specified by:
getClassSources
in interfaceAnalysisInputLocation
- Returns:
- an Autocloseable resource that must be closed!
-
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
-
getModulesClassSources
public @NonNull Stream<JavaSootClassSource> getModulesClassSources(@NonNull ModuleSignature moduleSignature, @NonNull View view) - Specified by:
getModulesClassSources
in interfaceModuleInfoAnalysisInputLocation
-
getClassSourcesInternal
protected Stream<JavaSootClassSource> getClassSourcesInternal(@NonNull ModuleSignature moduleSignature, @NonNull View view) -
getClassSource
public @NonNull Optional<JavaSootClassSource> getClassSource(@NonNull ClassType classType, @NonNull View view) Description copied from interface:AnalysisInputLocation
Create or find a class source for a given type.- Specified by:
getClassSource
in interfaceAnalysisInputLocation
- Parameters:
classType
- The type of the class to be found.- Returns:
- The source entry for that class.
-
hashCode
public int hashCode() -
equals
-