Package org.apache.maven.api.settings
Class ActivationProperty
java.lang.Object
org.apache.maven.api.settings.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
Modifier and TypeClassDescriptionstatic class
Builder class used to create ActivationProperty instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor 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 to be used to activate a profile.static ActivationProperty.Builder
Creates a newActivationProperty
builder instance.static ActivationProperty.Builder
newBuilder
(boolean withDefaults) Creates a newActivationProperty
builder instance using default values or not.static ActivationProperty.Builder
newBuilder
(ActivationProperty from) Creates a newActivationProperty
builder instance using the specified object as a basis.static ActivationProperty.Builder
newBuilder
(ActivationProperty from, boolean forceCopy) Creates a newActivationProperty
builder instance using the specified object as a basis.static ActivationProperty
Creates a newActivationProperty
instance.static ActivationProperty
newInstance
(boolean withDefaults) Creates a newActivationProperty
instance using default values or not.with()
Creates a new builder with this object as the basis.Creates a newActivationProperty
instance using the specified name.Creates a newActivationProperty
instance 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 to be used to activate a profile.- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getImportedFrom
Gets the input location that caused this model to be read. -
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withName
Creates a newActivationProperty
instance using the specified name.- Parameters:
name
- the newString
to use- Returns:
- a
ActivationProperty
with the specified name
-
withValue
Creates a newActivationProperty
instance using the specified value.- Parameters:
value
- the newString
to use- Returns:
- a
ActivationProperty
with the specified value
-
newInstance
Creates a newActivationProperty
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
ActivationProperty
- See Also:
-
newInstance
Creates a newActivationProperty
instance 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 newActivationProperty
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newActivationProperty
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newActivationProperty
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theActivationProperty
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static ActivationProperty.Builder newBuilder(ActivationProperty from, boolean forceCopy) Creates a newActivationProperty
builder instance using the specified object as a basis.- Parameters:
from
- theActivationProperty
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-