Class ActivationProperty

java.lang.Object
org.apache.maven.api.model.ActivationProperty
All Implemented Interfaces:
Serializable, InputLocationTracker

@Experimental @Generated @ThreadSafe @Immutable public class ActivationProperty extends Object implements Serializable, InputLocationTracker
This is the property specification used to activate a profile. If the value field is empty, then the existence of the named property will activate the profile, otherwise it does a case-sensitive match against the property value as well.
See Also:
  • Method Details

    • getName

      public String getName()
      The name of the property to be used to activate a profile.
      Returns:
      a String
    • getValue

      public String getValue()
      The value of the property required to activate a profile.
      Returns:
      a String
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      @Nonnull public ActivationProperty.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withName

      @Nonnull public ActivationProperty withName(String name)
      Creates a new ActivationProperty instance using the specified name.
      Parameters:
      name - the new String to use
      Returns:
      a ActivationProperty with the specified name
    • withValue

      @Nonnull public ActivationProperty withValue(String value)
      Creates a new ActivationProperty instance using the specified value.
      Parameters:
      value - the new String to use
      Returns:
      a ActivationProperty with the specified value
    • newInstance

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

      @Nonnull public static ActivationProperty newInstance(boolean withDefaults)
      Creates a new ActivationProperty 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 ActivationProperty
    • newBuilder

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

      @Nonnull public static ActivationProperty.Builder newBuilder(boolean withDefaults)
      Creates a new ActivationProperty 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 ActivationProperty.Builder newBuilder(ActivationProperty from)
      Creates a new ActivationProperty builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the ActivationProperty instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

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