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:
  • Field Summary

    Fields inherited from interface org.apache.maven.api.PathType

    UNRESOLVED
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether the given object represents the same type of path as this object.
    int
    Returns a hash code value based on the raw type and module name.
    id()
    Returns the name of the tool option for this path, including the module name.
    Returns the name of the module for which a path is specified
    Returns the name of the tool option for this path, not including the module name.
    Returns the name of the tool option for this path.
    option(Iterable<? extends Path> paths)
    Returns the option followed by a string representation of the given path elements.
    Returns the type of path without indication about the target module.
    Returns the programmatic name of this path type, including the module to patch.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • 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
    • id

      public String id()
      Returns the name of the tool option for this path, including the module name.
      Specified by:
      id in interface PathType
      Returns:
      name of the tool option for this path, including the module name
      See Also:
    • 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. The paths are not quoted.
      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 array if there is no path element.
    • hashCode

      public int hashCode()
      Returns a hash code value based on the raw type and module name..
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value based on the raw type and module name
    • equals

      public boolean equals(Object obj)
      Returns whether the given object represents the same type of path as this object..
      Overrides:
      equals in class Object
      Returns:
      whether the given object represents the same type of path as this object
    • 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