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
ConstructorDescriptionModuleFinder
(Path modulePath) ModuleFinder
(Path modulePath, FileSystem fileSystem, SourceType sourceType, List<BodyInterceptor> bodyInterceptors) Helper Class to discover modules in a given module path.ModuleFinder
(Path modulePath, SourceType sourceType, List<BodyInterceptor> bodyInterceptors) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Creates a name for an automatic module based on the name of a jar file.boolean
Discover all modules in the module path.getModule
(ModuleSignature moduleName) Returns the input location that manages the module.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
-