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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Requirement instances. -
Method Summary
Modifier and TypeMethodDescriptionThe field name which has this requirement.getRole()
static Requirement.Builder
Creates a newRequirement
builder instance.static Requirement.Builder
newBuilder
(boolean withDefaults) Creates a newRequirement
builder instance using default values or not.static Requirement.Builder
newBuilder
(Requirement from) Creates a newRequirement
builder instance using the specified object as a basis.static Requirement.Builder
newBuilder
(Requirement from, boolean forceCopy) Creates a newRequirement
builder instance using the specified object as a basis.static Requirement
Creates a newRequirement
instance.static Requirement
newInstance
(boolean withDefaults) Creates a newRequirement
instance using default values or not.with()
Creates a new builder with this object as the basis.withFieldName
(String fieldName) Creates a newRequirement
instance using the specified fieldName.Creates a newRequirement
instance using the specified role.withRoleHint
(String roleHint) Creates a newRequirement
instance using the specified roleHint.
-
Method Details
-
getRole
- Returns:
- a
String
-
getRoleHint
- Returns:
- a
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
Creates a newRequirement
instance using the specified role.- Parameters:
role
- the newString
to use- Returns:
- a
Requirement
with the specified role
-
withRoleHint
Creates a newRequirement
instance using the specified roleHint.- Parameters:
roleHint
- the newString
to use- Returns:
- a
Requirement
with the specified roleHint
-
withFieldName
Creates a newRequirement
instance using the specified fieldName.- Parameters:
fieldName
- the newString
to use- Returns:
- a
Requirement
with the specified fieldName
-
newInstance
Creates a newRequirement
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Requirement
- See Also:
-
newInstance
Creates a newRequirement
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Requirement
-
newBuilder
Creates a newRequirement
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newRequirement
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 newRequirement
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theRequirement
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newRequirement
builder instance using the specified object as a basis.- Parameters:
from
- theRequirement
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-