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 aJavaModulePathAnalysisInputLocationwhich 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 aJavaModulePathAnalysisInputLocationwhich 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 SourceTypeIf the AnalysisInputLocation is initialized with the SourceType then this method should return that specific SourceType.inthashCode()
-
Constructor Details
-
JavaModulePathAnalysisInputLocation
Creates aJavaModulePathAnalysisInputLocationwhich locates classes in the given module path.- Parameters:
modulePath- The class path to search in TheClassProviderfor generatingSootClassSourcees 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 aJavaModulePathAnalysisInputLocationwhich locates classes in the given module path.- Parameters:
modulePath- The class path to search in TheClassProviderfor generatingSootClassSourcees for the files found on the class pathfileSystem- filesystem for the path
-
-
Method Details
-
getModuleInfo
- Specified by:
getModuleInfoin interfaceModuleInfoAnalysisInputLocation
-
getModules
- Specified by:
getModulesin interfaceModuleInfoAnalysisInputLocation
-
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!
-
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
-
getModulesClassSources
public @NonNull Stream<JavaSootClassSource> getModulesClassSources(@NonNull ModuleSignature moduleSignature, @NonNull View view) - Specified by:
getModulesClassSourcesin 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:AnalysisInputLocationCreate or find a class source for a given type.- Specified by:
getClassSourcein interfaceAnalysisInputLocation- Parameters:
classType- The type of the class to be found.- Returns:
- The source entry for that class.
-
hashCode
public int hashCode() -
equals
-