Class ResolvePathRequest<T>


  • public abstract class ResolvePathRequest<T>
    extends java.lang.Object
    Since:
    1.0.0
    Author:
    Robert Scholte
    • Method Detail

      • ofPath

        public static ResolvePathRequest<java.nio.file.Path> ofPath​(java.nio.file.Path path)
      • ofString

        public static ResolvePathRequest<java.lang.String> ofString​(java.lang.String string)
      • toPath

        protected abstract java.nio.file.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 java.nio.file.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