Class ModuleFinder
java.lang.Object
sootup.java.bytecode.frontend.inputlocation.ModuleFinder
Discovers all modules in a given module path. For automatic modules, names are generated.
Supports exploded modules, modular jars, and automatic modules as defined in the official
documentation:
- Author:
- Andreas Dann on 28.06.18
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModuleFinder
(@NonNull Path modulePath) ModuleFinder
(@NonNull Path modulePath, @NonNull FileSystem fileSystem, @NonNull SourceType sourceType, @NonNull List<BodyInterceptor> bodyInterceptors) Helper Class to discover modules in a given module path.ModuleFinder
(@NonNull Path modulePath, @NonNull SourceType sourceType, @NonNull List<BodyInterceptor> bodyInterceptors) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull String
createModuleNameForAutomaticModule
(@NonNull Path path) Creates a name for an automatic module based on the name of a jar file.boolean
@NonNull Collection<ModuleSignature>
Discover all modules in the module path.@Nullable AnalysisInputLocation
getModule
(@NonNull ModuleSignature moduleName) Returns the input location that manages the module.@NonNull Optional<JavaModuleInfo>
@NonNull Set<ModuleSignature>
int
hashCode()
boolean
-
Constructor Details
-
ModuleFinder
public ModuleFinder(@NonNull Path modulePath, @NonNull FileSystem fileSystem, @NonNull SourceType sourceType, @NonNull List<BodyInterceptor> bodyInterceptors) Helper Class to discover modules in a given module path.- Parameters:
modulePath
- the module pathsourceType
-
-
ModuleFinder
public ModuleFinder(@NonNull Path modulePath, @NonNull SourceType sourceType, @NonNull List<BodyInterceptor> bodyInterceptors) -
ModuleFinder
-
-
Method Details
-
hasMoreToResolve
public boolean hasMoreToResolve() -
getModuleInfo
-
getModules
-
getModule
Returns the input location that manages the module.- Parameters:
moduleName
- the module name- Returns:
- the input location that resolves classes contained in the module
-
getAllModules
Discover all modules in the module path.- Returns:
- the names of all modules found
-
createModuleNameForAutomaticModule
Creates a name for an automatic module based on the name of a jar file. The implementation is consistent with parsing module names in the JDK 9.- Parameters:
path
- to the jar file- Returns:
- the name of the automatic module
-
hashCode
public int hashCode() -
equals
-