Package org.apache.maven.api.model
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
Modifier and TypeClassDescriptionstatic class
Builder class used to create Extension instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
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
The group ID of the extension's artifact.- Returns:
- a
String
-
getArtifactId
The artifact ID of the extension.- Returns:
- a
String
-
getVersion
The version of the extension.- Returns:
- a
String
-
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
Gets the keys of the locations of the input source. -
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
Creates a newExtension
instance using the specified groupId.- Parameters:
groupId
- the newString
to use- Returns:
- a
Extension
with the specified groupId
-
withArtifactId
Creates a newExtension
instance using the specified artifactId.- Parameters:
artifactId
- the newString
to use- Returns:
- a
Extension
with the specified artifactId
-
withVersion
Creates a newExtension
instance using the specified version.- Parameters:
version
- the newString
to use- Returns:
- a
Extension
with the specified version
-
withConfiguration
Creates a newExtension
instance using the specified configuration.- Parameters:
configuration
- the newXmlNode
to use- Returns:
- a
Extension
with the specified configuration
-
newInstance
Creates a newExtension
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Extension
- See Also:
-
newInstance
Creates a newExtension
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Extension
-
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
public int hashCode()
-