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. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExtension(Extension.Builder builder) Constructor for this class, to be called from its subclasses andExtension.Builder. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe 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.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.
-
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:
getLocationin interfaceInputLocationTracker
-
getLocationKeys
-
getLocationKeyStream
-
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFromin 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 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
-