|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.aether.util.artifact.AbstractArtifact
public abstract class AbstractArtifact
A skeleton class for artifacts that implements Object.equals(Object)
, Object.hashCode()
and
Object.toString()
.
Constructor Summary | |
---|---|
AbstractArtifact()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
protected static boolean |
isSnapshot(String version)
|
protected Artifact |
newInstance(String groupId,
String artifactId,
String classifier,
String extension,
String version,
Map<String,String> properties,
File file)
Creates a new artifact with the specified coordinates, properties and file. |
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 this artifact. |
protected static String |
toBaseVersion(String version)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.sonatype.aether.artifact.Artifact |
---|
getArtifactId, getBaseVersion, getClassifier, getExtension, getFile, getGroupId, getProperties, getProperty, getVersion, isSnapshot |
Constructor Detail |
---|
public AbstractArtifact()
Method Detail |
---|
protected static boolean isSnapshot(String version)
protected static String toBaseVersion(String version)
protected Artifact newInstance(String groupId, String artifactId, String classifier, String extension, String version, Map<String,String> properties, File file)
groupId
- The group identifier of the artifact, may be null
.artifactId
- The artifact identifier of the artifact, may be null
.classifier
- The classifier of the artifact, may be null
.extension
- The file extension of the artifact, may be null
.version
- The version of the artifact, may be null
.properties
- The properties of the artifact, may be null
if none. The method may assume immutability
of the supplied map.file
- The resolved file of the artifact, may be 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
setFile
in interface Artifact
file
- The file of the artifact, may be null
null
.public Artifact setProperties(Map<String,String> properties)
Artifact
setProperties
in interface Artifact
properties
- The properties for the artifact, may be null
.
null
.public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |