Class ResolvePathRequest<T>

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

public abstract class ResolvePathRequest<T> extends Object
Since:
1.0.0
Author:
Robert Scholte
  • Method Details

    • ofFile

      public static ResolvePathRequest<File> ofFile(File file)
    • ofPath

      public static ResolvePathRequest<Path> ofPath(Path path)
    • ofString

      public static ResolvePathRequest<String> ofString(String string)
    • toPath

      protected abstract Path toPath(T t)
    • getPathElement

      public T getPathElement()
    • setJdkHome

      public ResolvePathRequest<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()
    • setTargetRelease

      public ResolvePathRequest<T> setTargetRelease(JavaVersion targetRelease)
      The Java release the module descriptor 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 the module descriptor is resolved for, defaults to the running JDK's version
      Since:
      1.7.0