Class LocationManager

java.lang.Object
org.codehaus.plexus.languages.java.jpms.LocationManager

@Named @Singleton public class LocationManager extends Object
Maps artifacts to modules and analyzes the type of required modules
Since:
1.0.0
Author:
Robert Scholte
  • Constructor Details

    • LocationManager

      public LocationManager()
  • Method Details

    • parseModuleDescriptor

      public ResolvePathResult parseModuleDescriptor(Path descriptorPath) throws IOException
      Parameters:
      descriptorPath - never null
      Returns:
      the parsed module descriptor
      Throws:
      IOException - when descriptorPath could not be read
    • parseModuleDescriptor

      public ResolvePathResult parseModuleDescriptor(File descriptorPath) throws IOException
      Parameters:
      descriptorPath - never null
      Returns:
      the parsed module descriptor
      Throws:
      IOException - when descriptorPath could not be read
    • parseModuleDescriptor

      public ResolvePathResult parseModuleDescriptor(String descriptorPath) throws IOException
      Parameters:
      descriptorPath - never null
      Returns:
      the parsed module descriptor
      Throws:
      IOException - when descriptorPath could not be read
    • resolvePath

      public <T> ResolvePathResult resolvePath(ResolvePathRequest<T> request) throws IOException
      Resolve a single jar
      Parameters:
      request - the request
      Returns:
      the ResolvePathResult, containing the name and optional module descriptor
      Throws:
      IOException - if any occurs
    • resolvePaths

      public <T> ResolvePathsResult<T> resolvePaths(ResolvePathsRequest<T> request) throws IOException
      Decide for every request.getPathElements() if it belongs to the modulePath or classPath, based on the request.getMainModuleDescriptor().
      Parameters:
      request - the paths to resolve
      Returns:
      the result of the resolution
      Throws:
      IOException - if a critical IOException occurs