ArtifactDefaultArtifactpublic abstract class AbstractArtifact extends java.lang.Object implements Artifact
| Constructor | Description |
|---|---|
AbstractArtifact() |
| Modifier and Type | Method | Description |
|---|---|---|
protected static java.util.Map<java.lang.String,java.lang.String> |
copyProperties(java.util.Map<java.lang.String,java.lang.String> properties) |
Copies the specified artifact properties.
|
boolean |
equals(java.lang.Object obj) |
Compares this artifact with the specified object.
|
java.lang.String |
getBaseVersion() |
Gets the base version of this artifact, for example "1.0-SNAPSHOT".
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue) |
Gets the specified property.
|
int |
hashCode() |
Returns a hash code for this artifact.
|
boolean |
isSnapshot() |
Determines whether this artifact uses a snapshot version.
|
Artifact |
setFile(java.io.File file) |
Sets the file of the artifact.
|
Artifact |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties) |
Sets the properties for the artifact.
|
Artifact |
setVersion(java.lang.String version) |
Sets the version of the artifact.
|
java.lang.String |
toString() |
getArtifactId, getClassifier, getExtension, getFile, getGroupId, getProperties, getVersionpublic AbstractArtifact()
public boolean isSnapshot()
ArtifactisSnapshot in interface Artifacttrue if the artifact is a snapshot, false otherwise.public java.lang.String getBaseVersion()
ArtifactArtifact.getVersion(), the
base version will always refer to the unresolved meta version.getBaseVersion in interface Artifactnull.public Artifact setVersion(java.lang.String version)
ArtifactsetVersion in interface Artifactversion - The version of this artifact, may be null or empty.null.public Artifact setFile(java.io.File file)
Artifactpublic Artifact setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
ArtifactsetProperties in interface Artifactproperties - The properties for the artifact, may be null.null.ArtifactPropertiespublic java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
ArtifactgetProperty in interface Artifactkey - The name of the property, must not be null.defaultValue - The default value to return in case the property is not set, may be null.null if the property is not set and no default value was
provided.ArtifactPropertiesprotected static java.util.Map<java.lang.String,java.lang.String> copyProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties - The properties to copy, may be null.null.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to compare this artifact against, may be null.true if and only if the specified object is another Artifact with equal coordinates,
properties and file, false otherwise.public int hashCode()
hashCode in class java.lang.Object