Class JLinkResolver.Result

  • Enclosing class:
    JLinkResolver

    public class JLinkResolver.Result
    extends java.lang.Object
    Holds the resolver results.
    • Constructor Summary

      Constructors 
      Constructor Description
      Result()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToClasspath​(java.lang.String element)
      Adds additional elements to the classpath.
      Such as the conf directory.
      java.lang.String generateClassPath()
      Generates the class path option to be passed to bin/java.
      void generateJlinkModulePath​(org.tentackle.common.ToolRunner jlinkRunner)
      Generates the module-path option to be passed to jlink.
      void generateJlinkModules​(org.tentackle.common.ToolRunner jlinkRunner)
      Generates the module names option passed to jlink.
      java.lang.String generateModulePath()
      Generates the module path option to be passed to bin/java.
      java.util.List<org.apache.maven.artifact.Artifact> getClassPath()
      Gets the artifacts to add to the class path explicitly.
      java.util.List<java.lang.String> getExtraClassPathElements()
      Gets the additional elements added to the classpath.
      java.lang.String getImagePathPrefix()
      Gets the prefix to the runtime image path.
      java.util.List<ModularArtifact> getJlinkModules()
      Gets the modules to be passed to jlink.
      ModularArtifact getModuleArtifact​(java.lang.String moduleName)
      Gets a modular artifact by its name.
      java.util.List<ModularArtifact> getModulePath()
      Gets the modules to add to the module path explicitly.
      boolean isClassPathRequired()
      Returns whether the class path is not empty.
      boolean isModular()
      Returns whether this is a modular application.
      boolean isModulePathRequired()
      Returns whether the module path is not empty.
      boolean isPlainModular()
      Returns whether this is a plain modular application.
      Plain modular means that all requirements are met by real modules.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Result

        public Result()
    • Method Detail

      • getImagePathPrefix

        public java.lang.String getImagePathPrefix()
        Gets the prefix to the runtime image path.
        Returns:
        the path, empty if jlink image, else path to runtime image
      • getJlinkModules

        public java.util.List<ModularArtifact> getJlinkModules()
        Gets the modules to be passed to jlink.
        Returns:
        the modules
      • getModulePath

        public java.util.List<ModularArtifact> getModulePath()
        Gets the modules to add to the module path explicitly.
        Returns:
        the modules not passed to jlink
      • getClassPath

        public java.util.List<org.apache.maven.artifact.Artifact> getClassPath()
        Gets the artifacts to add to the class path explicitly.
        Returns:
        the class path
      • isModular

        public boolean isModular()
        Returns whether this is a modular application.
        Returns:
        true if modular
        See Also:
        isPlainModular()
      • isPlainModular

        public boolean isPlainModular()
        Returns whether this is a plain modular application.
        Plain modular means that all requirements are met by real modules. If not plain, the jlink tool is used to build a runtime image only and the application modules are placed on the module-path explicitly.
        Returns:
        true if plain modular, else mixed modular or classpath application
        See Also:
        isModular()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • addToClasspath

        public void addToClasspath​(java.lang.String element)
        Adds additional elements to the classpath.
        Such as the conf directory.
        Parameters:
        element - the classpath element to add
      • getExtraClassPathElements

        public java.util.List<java.lang.String> getExtraClassPathElements()
        Gets the additional elements added to the classpath.
        Returns:
        the extra classpath elements
      • generateJlinkModulePath

        public void generateJlinkModulePath​(org.tentackle.common.ToolRunner jlinkRunner)
        Generates the module-path option to be passed to jlink.
        Parameters:
        jlinkRunner - the jlink tool runner
      • generateJlinkModules

        public void generateJlinkModules​(org.tentackle.common.ToolRunner jlinkRunner)
        Generates the module names option passed to jlink.
        Parameters:
        jlinkRunner - the jlink tool runner
      • isModulePathRequired

        public boolean isModulePathRequired()
        Returns whether the module path is not empty.
        Returns:
        true if modulepath must be configured
      • generateModulePath

        public java.lang.String generateModulePath()
        Generates the module path option to be passed to bin/java.
        Returns:
        the option, empty if no extra module path
      • getModuleArtifact

        public ModularArtifact getModuleArtifact​(java.lang.String moduleName)
        Gets a modular artifact by its name.
        Parameters:
        moduleName - the module name
        Returns:
        the artifact, null if no such artifact
      • isClassPathRequired

        public boolean isClassPathRequired()
        Returns whether the class path is not empty.
        Returns:
        true if classpath must be configured
      • generateClassPath

        public java.lang.String generateClassPath()
        Generates the class path option to be passed to bin/java.
        Returns:
        the option, empty if no extra class path