Class LocationManager
java.lang.Object
org.codehaus.plexus.languages.java.jpms.LocationManager
Maps artifacts to modules and analyzes the type of required modules
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ManifestModuleNameExtractor
private SourceModuleInfoParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
collectProviders
(JavaModuleDescriptor moduleDescriptor, Map<String, Set<String>> availableProviders) (package private) ModuleInfoParser
getBinaryModuleInfoParser
(Path jdkHome) If the jdkHome is specified, its version it considered higher than the runtime java version.private <T> JavaModuleDescriptor
getMainModuleDescriptor
(ResolvePathsRequest<T> request, ModuleInfoParser binaryParser) parseModuleDescriptor
(File descriptorPath) parseModuleDescriptor
(String descriptorPath) parseModuleDescriptor
(Path descriptorPath) private ResolvePathResult
resolvePath
(Path path, ModuleNameExtractor fileModulenameExtractor, ModuleInfoParser binaryParser) resolvePath
(ResolvePathRequest<T> request) Resolve a single jar<T> ResolvePathsResult<T>
resolvePaths
(ResolvePathsRequest<T> request) Decide for everyrequest.getPathElements()
if it belongs to the modulePath or classPath, based on therequest.getMainModuleDescriptor()
.private void
selectModule
(String module, Map<String, JavaModuleDescriptor> availableModules, Map<String, Set<String>> availableProviders, Set<String> namedModules, boolean isRootModule, boolean includeTransitive, boolean includeStatic) private void
selectRequires
(JavaModuleDescriptor module, Map<String, JavaModuleDescriptor> availableModules, Map<String, Set<String>> availableProviders, Set<String> namedModules, boolean isRootModule, boolean includeAsTransitive, boolean includeStatic)
-
Field Details
-
sourceParser
-
manifestModuleNameExtractor
-
-
Constructor Details
-
LocationManager
public LocationManager() -
LocationManager
LocationManager(SourceModuleInfoParser sourceParser)
-
-
Method Details
-
parseModuleDescriptor
- Parameters:
descriptorPath
- nevernull
- Returns:
- the parsed module descriptor
- Throws:
IOException
- when descriptorPath could not be read
-
parseModuleDescriptor
- Parameters:
descriptorPath
- nevernull
- Returns:
- the parsed module descriptor
- Throws:
IOException
- when descriptorPath could not be read
-
parseModuleDescriptor
- Parameters:
descriptorPath
- nevernull
- Returns:
- the parsed module descriptor
- Throws:
IOException
- when descriptorPath could not be read
-
resolvePath
Resolve a single jar- Parameters:
request
- the request- Returns:
- the
ResolvePathResult
, containing the name and optional module descriptor - Throws:
IOException
- if any occurs
-
resolvePaths
Decide for everyrequest.getPathElements()
if it belongs to the modulePath or classPath, based on therequest.getMainModuleDescriptor()
.- Parameters:
request
- the paths to resolve- Returns:
- the result of the resolution
- Throws:
IOException
- if a critical IOException occurs
-
getBinaryModuleInfoParser
If the jdkHome is specified, its version it considered higher than the runtime java version. In that case ASM must be used to read the module descriptor- Parameters:
jdkHome
-- Returns:
-
getMainModuleDescriptor
private <T> JavaModuleDescriptor getMainModuleDescriptor(ResolvePathsRequest<T> request, ModuleInfoParser binaryParser) throws IOException - Throws:
IOException
-
resolvePath
private ResolvePathResult resolvePath(Path path, ModuleNameExtractor fileModulenameExtractor, ModuleInfoParser binaryParser) throws IOException - Throws:
IOException
-
selectRequires
private void selectRequires(JavaModuleDescriptor module, Map<String, JavaModuleDescriptor> availableModules, Map<String, Set<String>> availableProviders, Set<String> namedModules, boolean isRootModule, boolean includeAsTransitive, boolean includeStatic) -
selectModule
-
collectProviders
private void collectProviders(JavaModuleDescriptor moduleDescriptor, Map<String, Set<String>> availableProviders)
-