Class Requirement

java.lang.Object
org.apache.maven.api.plugin.descriptor.Requirement
All Implemented Interfaces:
Serializable

@Experimental @Generated @ThreadSafe @Immutable public class Requirement extends Object implements Serializable
Describes a component requirement.
See Also:
  • Constructor Details

  • Method Details

    • getRole

      public String getRole()
      Returns:
      a String
    • getRoleHint

      public String getRoleHint()
      Returns:
      a String
    • getFieldName

      public String getFieldName()
      The field name which has this requirement.
      Returns:
      a String
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withRole

      @Nonnull public Requirement withRole(String role)
      Creates a new Requirement instance using the specified role.
      Parameters:
      role - the new String to use
      Returns:
      a Requirement with the specified role
    • withRoleHint

      @Nonnull public Requirement withRoleHint(String roleHint)
      Creates a new Requirement instance using the specified roleHint.
      Parameters:
      roleHint - the new String to use
      Returns:
      a Requirement with the specified roleHint
    • withFieldName

      @Nonnull public Requirement withFieldName(String fieldName)
      Creates a new Requirement instance using the specified fieldName.
      Parameters:
      fieldName - the new String to use
      Returns:
      a Requirement with the specified fieldName
    • newInstance

      @Nonnull public static Requirement newInstance()
      Creates a new Requirement instance. Equivalent to newInstance(true).
      Returns:
      a new Requirement
      See Also:
    • newInstance

      @Nonnull public static Requirement newInstance(boolean withDefaults)
      Creates a new Requirement instance using default values or not. Equivalent to newBuilder(withDefaults).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Requirement
    • newBuilder

      @Nonnull public static Requirement.Builder newBuilder()
      Creates a new Requirement builder instance. Equivalent to newBuilder(true).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static Requirement.Builder newBuilder(boolean withDefaults)
      Creates a new Requirement builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Requirement.Builder newBuilder(Requirement from)
      Creates a new Requirement builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the Requirement instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Requirement.Builder newBuilder(Requirement from, boolean forceCopy)
      Creates a new Requirement builder instance using the specified object as a basis.
      Parameters:
      from - the Requirement instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder