Package org.apache.maven.api.metadata
Class SnapshotVersion
java.lang.Object
org.apache.maven.api.metadata.SnapshotVersion
- All Implemented Interfaces:
- Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class SnapshotVersion
extends Object
implements Serializable
Versioning information for a sub-artifact of the current snapshot artifact.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create SnapshotVersion instances.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSnapshotVersion(SnapshotVersion.Builder builder) Constructor for this class, to be called from its subclasses andSnapshotVersion.Builder.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanThe classifier of the sub-artifact.The file extension of the sub-artifact.The timestamp when this version information was last updated.The resolved snapshot version of the sub-artifact.inthashCode()static SnapshotVersion.BuilderCreates a newSnapshotVersionbuilder instance.static SnapshotVersion.BuildernewBuilder(boolean withDefaults) Creates a newSnapshotVersionbuilder instance using default values or not.static SnapshotVersion.BuildernewBuilder(SnapshotVersion from) Creates a newSnapshotVersionbuilder instance using the specified object as a basis.static SnapshotVersion.BuildernewBuilder(SnapshotVersion from, boolean forceCopy) Creates a newSnapshotVersionbuilder instance using the specified object as a basis.static SnapshotVersionCreates a newSnapshotVersioninstance.static SnapshotVersionnewInstance(boolean withDefaults) Creates a newSnapshotVersioninstance using default values or not.with()Creates a new builder with this object as the basis.withClassifier(String classifier) Creates a newSnapshotVersioninstance using the specified classifier.withExtension(String extension) Creates a newSnapshotVersioninstance using the specified extension.withUpdated(String updated) Creates a newSnapshotVersioninstance using the specified updated.withVersion(String version) Creates a newSnapshotVersioninstance using the specified version.
- 
Constructor Details- 
SnapshotVersionConstructor for this class, to be called from its subclasses andSnapshotVersion.Builder.- See Also:
 
 
- 
- 
Method Details- 
equals
- 
hashCodepublic int hashCode()
- 
getClassifierThe classifier of the sub-artifact. Each classifier and extension pair may only appear once.- Returns:
- a String
 
- 
getExtensionThe file extension of the sub-artifact. Each classifier and extension pair may only appear once.- Returns:
- a String
 
- 
getVersionThe resolved snapshot version of the sub-artifact.- Returns:
- a String
 
- 
getUpdatedThe timestamp when this version information was last updated. The timestamp is expressed using UTC in the format yyyyMMddHHmmss.- Returns:
- a String
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withClassifierCreates a newSnapshotVersioninstance using the specified classifier.- Parameters:
- classifier- the new- Stringto use
- Returns:
- a SnapshotVersionwith the specified classifier
 
- 
withExtensionCreates a newSnapshotVersioninstance using the specified extension.- Parameters:
- extension- the new- Stringto use
- Returns:
- a SnapshotVersionwith the specified extension
 
- 
withVersionCreates a newSnapshotVersioninstance using the specified version.- Parameters:
- version- the new- Stringto use
- Returns:
- a SnapshotVersionwith the specified version
 
- 
withUpdatedCreates a newSnapshotVersioninstance using the specified updated.- Parameters:
- updated- the new- Stringto use
- Returns:
- a SnapshotVersionwith the specified updated
 
- 
newInstanceCreates a newSnapshotVersioninstance. Equivalent tonewInstance(true).- Returns:
- a new SnapshotVersion
- See Also:
 
- 
newInstanceCreates a newSnapshotVersioninstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new SnapshotVersion
 
- 
newBuilderCreates a newSnapshotVersionbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newSnapshotVersionbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newSnapshotVersionbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- SnapshotVersioninstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newSnapshotVersionbuilder instance using the specified object as a basis.- Parameters:
- from- the- SnapshotVersioninstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-