Class ResolvePathsRequest<T>

java.lang.Object
org.codehaus.plexus.languages.java.jpms.ResolvePathsRequest<T>

public abstract class ResolvePathsRequest<T> extends Object
Contains all information required to analyze the project
Since:
1.0.0
Author:
Robert Scholte
  • Method Details

    • withFiles

      @Deprecated public static ResolvePathsRequest<File> withFiles(Collection<File> files)
      Deprecated.
    • ofFiles

      public static ResolvePathsRequest<File> ofFiles(File... files)
    • ofFiles

      public static ResolvePathsRequest<File> ofFiles(Collection<File> files)
    • withPaths

      @Deprecated public static ResolvePathsRequest<Path> withPaths(Collection<Path> paths)
      Deprecated.
    • ofPaths

      public static ResolvePathsRequest<Path> ofPaths(Path... paths)
    • ofPaths

      public static ResolvePathsRequest<Path> ofPaths(Collection<Path> paths)
    • withStrings

      @Deprecated public static ResolvePathsRequest<String> withStrings(Collection<String> strings)
      Deprecated.
    • ofStrings

      public static ResolvePathsRequest<String> ofStrings(String... strings)
    • ofStrings

      public static ResolvePathsRequest<String> ofStrings(Collection<String> strings)
    • toPath

      protected abstract Path toPath(T t)
    • getMainModuleDescriptor

      public Path getMainModuleDescriptor()
    • getModuleDescriptor

      public JavaModuleDescriptor getModuleDescriptor()
    • setMainModuleDescriptor

      public ResolvePathsRequest<T> setMainModuleDescriptor(T mainModuleDescriptor)
      Must be either module-info.java or module-info.class
      Parameters:
      mainModuleDescriptor -
      Returns:
      this request
    • setModuleDescriptor

      public ResolvePathsRequest<T> setModuleDescriptor(JavaModuleDescriptor mainModuleDescriptor)
      Provide a resolved module descriptor
      Parameters:
      mainModuleDescriptor -
      Returns:
      this request
    • getPathElements

      public Collection<T> getPathElements()
    • setJdkHome

      public ResolvePathsRequest<T> setJdkHome(T jdkHome)
      In case the JRE is Java 8 or before, this jdkHome is used to extract the module name.
      Parameters:
      jdkHome -
      Returns:
      this request
    • getJdkHome

      public Path getJdkHome()
    • setAdditionalModules

      public ResolvePathsRequest<T> setAdditionalModules(Collection<String> additionalModules)
      The module names that are usually passed with --add-modules
      Parameters:
      additionalModules -
      Returns:
      this request
    • getAdditionalModules

      public Collection<String> getAdditionalModules()
    • setIncludeAllProviders

      public ResolvePathsRequest<T> setIncludeAllProviders(boolean includeAllProviders)
      Will also include all modules that contain providers for used services, should only be used at runtime (not during compile nor test)
      Parameters:
      includeAllProviders -
      Returns:
      this request
    • isIncludeAllProviders

      public boolean isIncludeAllProviders()
    • isIncludeStatic

      public boolean isIncludeStatic()
      Returns:
      true if the result will include all static dependencies
      Since:
      1.0.5
    • setIncludeStatic

      public ResolvePathsRequest<T> setIncludeStatic(boolean includeStatic)
      Parameters:
      includeStatic - true if the result must include all static dependencies
      Returns:
      this request
      Since:
      1.0.5
    • setTargetRelease

      public ResolvePathsRequest<T> setTargetRelease(JavaVersion targetRelease)
      The Java release the module descriptors must be resolved for - the javac --release value, or -target when --release is unset. Accepts "1.8"-style values as well as bare major versions. This picks the applicable versioned module-info.class of a multi-release jar or output directory, i.e. the highest META-INF/versions/<N> whose N does not exceed this release. Defaults to the version of the running JDK, so callers that compile for a different release should set this explicitly.
      Parameters:
      targetRelease - the target release, never null
      Returns:
      this request
      Since:
      1.7.0
    • getTargetRelease

      public JavaVersion getTargetRelease()
      Returns:
      the Java release module descriptors are resolved for, defaults to the running JDK's version
      Since:
      1.7.0