|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.aether.util.artifact.AbstractArtifact
org.sonatype.aether.util.artifact.DefaultArtifact
public final class DefaultArtifact
A simple artifact.
| Constructor Summary | |
|---|---|
DefaultArtifact(String coords)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(String coords,
Map<String,String> properties)
Creates a new artifact with the specified coordinates and properties. |
|
DefaultArtifact(String groupId,
String artifactId,
String extension,
String version)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version,
ArtifactType type)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version,
Map<String,String> properties,
ArtifactType type)
Creates a new artifact with the specified coordinates and properties. |
|
DefaultArtifact(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. |
|
| Method Summary | |
|---|---|
String |
getArtifactId()
|
String |
getBaseVersion()
|
String |
getClassifier()
|
String |
getExtension()
|
File |
getFile()
|
String |
getGroupId()
|
Map<String,String> |
getProperties()
|
String |
getProperty(String key,
String defaultValue)
|
String |
getVersion()
|
boolean |
isSnapshot()
|
Artifact |
setFile(File file)
|
Artifact |
setProperties(Map<String,String> properties)
|
Artifact |
setVersion(String version)
|
| Methods inherited from class org.sonatype.aether.util.artifact.AbstractArtifact |
|---|
equals, hashCode, isSnapshot, toBaseVersion, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultArtifact(String coords)
coords - The artifact coordinates in the format
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>, must not be null.
public DefaultArtifact(String coords,
Map<String,String> properties)
coords - The artifact coordinates in the format
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>, must not be null.properties - The artifact properties, may be null.
public DefaultArtifact(String groupId,
String artifactId,
String extension,
String version)
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier 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.
public DefaultArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version)
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.
public DefaultArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version,
ArtifactType type)
null.
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.type - The artifact type from which to query classifier, file extension and properties, may be null.
public DefaultArtifact(String groupId,
String artifactId,
String classifier,
String extension,
String version,
Map<String,String> properties,
ArtifactType type)
null. If the artifact type specifies properties, those will get merged with the
properties passed directly into the constructor, with the latter properties taking precedence.
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.type - The artifact type from which to query classifier, file extension and properties, may be null.
public DefaultArtifact(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.file - The resolved file of the artifact, may be null.| Method Detail |
|---|
public String getGroupId()
public String getArtifactId()
public String getBaseVersion()
public String getVersion()
public Artifact setVersion(String version)
setVersion in interface ArtifactsetVersion in class AbstractArtifactpublic boolean isSnapshot()
public String getClassifier()
public String getExtension()
public File getFile()
public Artifact setFile(File file)
setFile in interface ArtifactsetFile in class AbstractArtifact
public String getProperty(String key,
String defaultValue)
public Map<String,String> getProperties()
public Artifact setProperties(Map<String,String> properties)
setProperties in interface ArtifactsetProperties in class AbstractArtifact
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||