public abstract class AbstractArtifact extends Object implements Artifact
Constructor and Description |
---|
AbstractArtifact() |
Modifier and Type | Method and Description |
---|---|
protected static Map<String,String> |
copyProperties(Map<String,String> properties)
Copies the specified artifact properties.
|
boolean |
equals(Object obj)
Compares this artifact with the specified object.
|
String |
getBaseVersion()
Gets the base version of this artifact, for example "1.0-SNAPSHOT".
|
String |
getProperty(String key,
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(File file)
Sets the file of the artifact.
|
Artifact |
setProperties(Map<String,String> properties)
Sets the properties for the artifact.
|
Artifact |
setVersion(String version)
Sets the version of the artifact.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getArtifactId, getClassifier, getExtension, getFile, getGroupId, getProperties, getVersion
public AbstractArtifact()
public boolean isSnapshot()
Artifact
isSnapshot
in interface Artifact
true
if the artifact is a snapshot, false
otherwise.public String getBaseVersion()
Artifact
Artifact.getVersion()
, the
base version will always refer to the unresolved meta version.getBaseVersion
in interface Artifact
null
.public Artifact setVersion(String version)
Artifact
setVersion
in interface Artifact
version
- The version of this artifact, may be null
or empty.null
.public Artifact setFile(File file)
Artifact
public Artifact setProperties(Map<String,String> properties)
Artifact
setProperties
in interface Artifact
properties
- The properties for the artifact, may be null
.null
.ArtifactProperties
public String getProperty(String key, String defaultValue)
Artifact
getProperty
in interface Artifact
key
- 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.ArtifactProperties
protected static Map<String,String> copyProperties(Map<String,String> properties)
properties
- The properties to copy, may be null
.null
.Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.