Class JrtFileSystemAnalysisInputLocation
java.lang.Object
sootup.java.bytecode.frontend.inputlocation.JrtFileSystemAnalysisInputLocation
- All Implemented Interfaces:
AnalysisInputLocation
,ModuleInfoAnalysisInputLocation
public class JrtFileSystemAnalysisInputLocation
extends Object
implements ModuleInfoAnalysisInputLocation
Base class for
AnalysisInputLocation
s that can be located by a Path
object.- Author:
- Andreas Dann created on 06.06.18
-
Constructor Summary
ConstructorsConstructorDescriptionJrtFileSystemAnalysisInputLocation
(@NonNull SourceType sourceType) JrtFileSystemAnalysisInputLocation
(@NonNull SourceType sourceType, @NonNull List<BodyInterceptor> bodyInterceptors) -
Method Summary
Modifier and TypeMethodDescription@NonNull Collection<ModuleSignature>
Discover and return all modules contained in the jrt filesystem.boolean
@NonNull List<BodyInterceptor>
protected ClassProvider
getClassProvider
(@NonNull View view) @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 @NonNull Stream<JavaSootClassSource>
getClassSourcesInternal
(@NonNull ModuleSignature moduleSignature, @NonNull IdentifierFactory identifierFactory, @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) Retreive CLassSources of a module specified by methodSignature@NonNull SourceType
If the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.int
hashCode()
-
Constructor Details
-
JrtFileSystemAnalysisInputLocation
public JrtFileSystemAnalysisInputLocation() -
JrtFileSystemAnalysisInputLocation
-
JrtFileSystemAnalysisInputLocation
public JrtFileSystemAnalysisInputLocation(@NonNull SourceType sourceType, @NonNull List<BodyInterceptor> bodyInterceptors)
-
-
Method Details
-
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.
-
getModulesClassSources
public @NonNull Stream<JavaSootClassSource> getModulesClassSources(@NonNull ModuleSignature moduleSignature, @NonNull View view) Retreive CLassSources of a module specified by methodSignature- Specified by:
getModulesClassSources
in interfaceModuleInfoAnalysisInputLocation
-
getClassSourcesInternal
protected @NonNull Stream<JavaSootClassSource> getClassSourcesInternal(@NonNull ModuleSignature moduleSignature, @NonNull IdentifierFactory identifierFactory, @NonNull View view) -
getClassProvider
-
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!
-
discoverModules
Discover and return all modules contained in the jrt filesystem.- Returns:
- Collection of found module names.
-
getModuleInfo
- Specified by:
getModuleInfo
in interfaceModuleInfoAnalysisInputLocation
-
getModules
- Specified by:
getModules
in interfaceModuleInfoAnalysisInputLocation
-
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
-
equals
-
hashCode
public int hashCode()
-