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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Extension instances. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe artifact ID of the extension.The configuration of the extension.The group ID of the extension's artifact.getLocation(Object key) Gets the location of the specified field in the input source.The version of the extension.inthashCode()static Extension.BuilderCreates a newExtensionbuilder instance.static Extension.BuildernewBuilder(boolean withDefaults) Creates a newExtensionbuilder instance using default values or not.static Extension.BuildernewBuilder(Extension from) Creates a newExtensionbuilder instance using the specified object as a basis.static Extension.BuildernewBuilder(Extension from, boolean forceCopy) Creates a newExtensionbuilder instance using the specified object as a basis.static ExtensionCreates a newExtensioninstance.static ExtensionnewInstance(boolean withDefaults) Creates a newExtensioninstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newExtensioninstance using the specified artifactId.withConfiguration(XmlNode configuration) Creates a newExtensioninstance using the specified configuration.withGroupId(String groupId) Creates a newExtensioninstance using the specified groupId.withVersion(String version) Creates a newExtensioninstance using the specified version.
-
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.
Since: Maven 4.0.0- Returns:
- a
XmlNode
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withGroupId
Creates a newExtensioninstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
Extensionwith the specified groupId
-
withArtifactId
Creates a newExtensioninstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
Extensionwith the specified artifactId
-
withVersion
Creates a newExtensioninstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
Extensionwith the specified version
-
withConfiguration
Creates a newExtensioninstance using the specified configuration.- Parameters:
configuration- the newXmlNodeto use- Returns:
- a
Extensionwith the specified configuration
-
newInstance
Creates a newExtensioninstance. Equivalent tonewInstance(true).- Returns:
- a new
Extension - See Also:
-
newInstance
Creates a newExtensioninstance 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 newExtensionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newExtensionbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newExtensionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theExtensioninstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newExtensionbuilder instance using the specified object as a basis.- Parameters:
from- theExtensioninstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
equals
-
hashCode
public int hashCode()
-