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 ModuleInfoParser
private ManifestModuleNameExtractor
private SourceModuleInfoParser
-
Constructor Summary
ConstructorsConstructorDescriptionLocationManager
(ModuleInfoParser binaryParser, SourceModuleInfoParser sourceParser) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
collectProviders
(JavaModuleDescriptor moduleDescriptor, Map<String, Set<String>> availableProviders) private <T> JavaModuleDescriptor
getMainModuleDescriptor
(ResolvePathsRequest<T> request) parseModuleDescriptor
(File descriptorPath) parseModuleDescriptor
(String descriptorPath) parseModuleDescriptor
(Path descriptorPath) private ResolvePathResult
resolvePath
(Path path, ModuleNameExtractor fileModulenameExtractor) 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 includeStatic) private void
selectRequires
(JavaModuleDescriptor module, Map<String, JavaModuleDescriptor> availableModules, Map<String, Set<String>> availableProviders, Set<String> namedModules, boolean includeStatic)
-
Field Details
-
binaryParser
-
sourceParser
-
manifestModuleNameExtractor
-
-
Constructor Details
-
LocationManager
public LocationManager() -
LocationManager
LocationManager(ModuleInfoParser binaryParser, 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
-
getMainModuleDescriptor
private <T> JavaModuleDescriptor getMainModuleDescriptor(ResolvePathsRequest<T> request) throws IOException - Throws:
IOException
-
resolvePath
private ResolvePathResult resolvePath(Path path, ModuleNameExtractor fileModulenameExtractor) throws IOException - Throws:
IOException
-
selectRequires
private void selectRequires(JavaModuleDescriptor module, Map<String, JavaModuleDescriptor> availableModules, Map<String, Set<String>> availableProviders, Set<String> namedModules, boolean includeStatic) -
selectModule
-
collectProviders
private void collectProviders(JavaModuleDescriptor moduleDescriptor, Map<String, Set<String>> availableProviders)
-