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, waitgetArtifactId, getClassifier, getExtension, getFile, getGroupId, getProperties, getVersionpublic AbstractArtifact()
public boolean isSnapshot()
ArtifactisSnapshot in interface Artifacttrue if the artifact is a snapshot, false otherwise.public String getBaseVersion()
ArtifactArtifact.getVersion(), the
 base version will always refer to the unresolved meta version.getBaseVersion in interface Artifactnull.public Artifact setVersion(String version)
ArtifactsetVersion in interface Artifactversion - The version of this artifact, may be null or empty.null.public Artifact setFile(File file)
Artifactpublic Artifact setProperties(Map<String,String> properties)
ArtifactsetProperties in interface Artifactproperties - The properties for the artifact, may be null.null.ArtifactPropertiespublic String getProperty(String key, 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 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.