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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Extension instances.
- 
Method SummaryModifier 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- 
getGroupIdThe group ID of the extension's artifact.- Returns:
- a String
 
- 
getArtifactIdThe artifact ID of the extension.- Returns:
- a String
 
- 
getVersionThe version of the extension.- Returns:
- a String
 
- 
getConfigurationThe configuration of the extension.
 Since: Maven 4.0.0- Returns:
- a XmlNode
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withGroupIdCreates a newExtensioninstance using the specified groupId.- Parameters:
- groupId- the new- Stringto use
- Returns:
- a Extensionwith the specified groupId
 
- 
withArtifactIdCreates a newExtensioninstance using the specified artifactId.- Parameters:
- artifactId- the new- Stringto use
- Returns:
- a Extensionwith the specified artifactId
 
- 
withVersionCreates a newExtensioninstance using the specified version.- Parameters:
- version- the new- Stringto use
- Returns:
- a Extensionwith the specified version
 
- 
withConfigurationCreates a newExtensioninstance using the specified configuration.- Parameters:
- configuration- the new- XmlNodeto use
- Returns:
- a Extensionwith the specified configuration
 
- 
newInstanceCreates a newExtensioninstance. Equivalent tonewInstance(true).- Returns:
- a new Extension
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newExtensionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newExtensionbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newExtensionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Extensioninstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newExtensionbuilder instance using the specified object as a basis.- Parameters:
- from- the- Extensioninstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
- 
equals
- 
hashCodepublic int hashCode()
 
-