Class JavaPathType.Modular

java.lang.Object
org.apache.maven.api.JavaPathType.Modular
All Implemented Interfaces:
PathType
Enclosing class:
JavaPathType

public final class JavaPathType.Modular extends Object implements PathType
Type of path which is applied to only one specific Java module. The main case is the Java --patch-module option.
See Also:
  • Method Details

    • id

      public String id()
      Description copied from interface: PathType
      Returns the unique name of this path type, including the module to patch if any. For example, if this type is JavaPathType.MODULES, then this method returns "MODULES". But if this type was created by JavaPathType.patchModule("foo.bar"), then this method returns "PATCH_MODULE:foo.bar".
      Specified by:
      id in interface PathType
      Returns:
      the programmatic name together with the module name on which it applies
      See Also:
    • rawType

      @Nonnull public JavaPathType rawType()
      Returns the type of path without indication about the target module. This is usually JavaPathType.PATCH_MODULE.
      Returns:
      type of path without indication about the target module
    • name

      @Nonnull public String name()
      Returns the name of the tool option for this path, not including the module name.
      Specified by:
      name in interface PathType
      Returns:
      name of the tool option for this path, not including the module name
    • moduleName

      @Nonnull public String moduleName()
      Returns the name of the module for which a path is specified
      Returns:
      name of the module for which a path is specified
    • option

      @Nonnull public Optional<String> option()
      Returns the name of the tool option for this path. The option does not include the module name on which it applies.
      Specified by:
      option in interface PathType
      Returns:
      the name of the tool option for this path type
    • option

      @Nonnull public String option(Iterable<? extends Path> paths)
      Returns the option followed by a string representation of the given path elements. The path elements are separated by an option-specific or platform-specific separator. If the given paths argument contains no element, then this method returns an empty string.
      Specified by:
      option in interface PathType
      Parameters:
      paths - the path to format as a string
      Returns:
      the option associated to this path type followed by the given path elements, or an empty string if there is no path element.
    • toString

      @Nonnull public String toString()
      Returns the programmatic name of this path type, including the module to patch. For example, if this type was created by JavaPathType.patchModule("foo.bar"), then this method returns "PathType[PATCH_MODULE:foo.bar]").
      Specified by:
      toString in interface PathType
      Overrides:
      toString in class Object
      Returns:
      the programmatic name together with the module name on which it applies