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
ConstructorDescriptionJavaModulePathAnalysisInputLocation
(Path modulePath) Creates aJavaModulePathAnalysisInputLocation
which locates classes in the given module path.JavaModulePathAnalysisInputLocation
(Path modulePath, FileSystem fileSystem, SourceType sourcetype) JavaModulePathAnalysisInputLocation
(Path modulePath, FileSystem fileSystem, SourceType sourcetype, List<BodyInterceptor> bodyInterceptors) Creates aJavaModulePathAnalysisInputLocation
which locates classes in the given module path.JavaModulePathAnalysisInputLocation
(Path modulePath, SourceType sourcetype) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getClassSource
(ClassType classType, 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.protected Stream<JavaSootClassSource>
getClassSourcesInternal
(ModuleSignature moduleSignature, View view) getModuleInfo
(ModuleSignature sig, View view) getModules
(View view) getModulesClassSources
(ModuleSignature moduleSignature, View view) 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:
- The source entries.
-
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
@Nonnull public Collection<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
@Nonnull public 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
-