Class Extension
java.lang.Object
org.apache.maven.api.model.Extension
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Extension
extends Object
implements Serializable, InputLocationTracker
Describes a build extension to utilise.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder class used to create Extension instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Extension
(Extension.Builder builder) Constructor for this class, to be called from its subclasses andExtension.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
The artifact ID of the extension.The configuration of the extension.The group ID of the extension's artifact.Gets 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.The version of the extension.int
hashCode()
static Extension.Builder
Creates a newExtension
builder instance.static Extension.Builder
newBuilder
(boolean withDefaults) Creates a newExtension
builder instance using default values or not.static Extension.Builder
newBuilder
(Extension from) Creates a newExtension
builder instance using the specified object as a basis.static Extension.Builder
newBuilder
(Extension from, boolean forceCopy) Creates a newExtension
builder instance using the specified object as a basis.static Extension
Creates a newExtension
instance.static Extension
newInstance
(boolean withDefaults) Creates a newExtension
instance using default values or not.with()
Creates a new builder with this object as the basis.withArtifactId
(String artifactId) Creates a newExtension
instance using the specified artifactId.withConfiguration
(XmlNode configuration) Creates a newExtension
instance using the specified configuration.withGroupId
(String groupId) Creates a newExtension
instance using the specified groupId.withVersion
(String version) Creates a newExtension
instance using the specified version.
-
Constructor Details
-
Extension
Constructor for this class, to be called from its subclasses andExtension.Builder
.- See Also:
-
-
Method Details
-
getGroupId
-
getArtifactId
-
getVersion
-
getConfiguration
The configuration of the extension.- Returns:
- a
XmlNode
- Since:
- Maven 4.0.0
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
getLocationKeys
-
getLocationKeyStream
-
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFrom
in interfaceInputLocationTracker
- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withGroupId
-
withArtifactId
-
withVersion
-
withConfiguration
-
newInstance
-
newInstance
-
newBuilder
Creates a newExtension
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newExtension
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 newExtension
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theExtension
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newExtension
builder instance using the specified object as a basis.- Parameters:
from
- theExtension
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
equals
-
hashCode
-