Package org.apache.maven.api.model
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create ActivationProperty instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for this class, to be called from its subclasses andActivationProperty.Builder. -
Method Summary
Modifier and TypeMethodDescriptionGets the input location that caused this model to be read.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.getName()The name of the property to be used to activate a profile.getValue()The value of the property required to activate a profile.static ActivationProperty.BuilderCreates a newActivationPropertybuilder instance.static ActivationProperty.BuildernewBuilder(boolean withDefaults) Creates a newActivationPropertybuilder instance using default values or not.static ActivationProperty.BuildernewBuilder(ActivationProperty from) Creates a newActivationPropertybuilder instance using the specified object as a basis.static ActivationProperty.BuildernewBuilder(ActivationProperty from, boolean forceCopy) Creates a newActivationPropertybuilder instance using the specified object as a basis.static ActivationPropertyCreates a newActivationPropertyinstance.static ActivationPropertynewInstance(boolean withDefaults) Creates a newActivationPropertyinstance using default values or not.with()Creates a new builder with this object as the basis.Creates a newActivationPropertyinstance using the specified name.Creates a newActivationPropertyinstance using the specified value.
-
Constructor Details
-
ActivationProperty
Constructor for this class, to be called from its subclasses andActivationProperty.Builder.- See Also:
-
-
Method Details
-
getName
The name of the property to be used to activate a profile.- Returns:
- a
String
-
getValue
The value of the property required to activate a profile.- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFromin interfaceInputLocationTracker- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withName
Creates a newActivationPropertyinstance using the specified name.- Parameters:
name- the newStringto use- Returns:
- a
ActivationPropertywith the specified name
-
withValue
Creates a newActivationPropertyinstance using the specified value.- Parameters:
value- the newStringto use- Returns:
- a
ActivationPropertywith the specified value
-
newInstance
Creates a newActivationPropertyinstance. Equivalent tonewInstance(true).- Returns:
- a new
ActivationProperty - See Also:
-
newInstance
Creates a newActivationPropertyinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
ActivationProperty
-
newBuilder
Creates a newActivationPropertybuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newActivationPropertybuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newActivationPropertybuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theActivationPropertyinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static ActivationProperty.Builder newBuilder(ActivationProperty from, boolean forceCopy) Creates a newActivationPropertybuilder instance using the specified object as a basis.- Parameters:
from- theActivationPropertyinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-