Package org.fedoraproject.xmvn.artifact
Class DefaultArtifact
java.lang.Object
org.fedoraproject.xmvn.artifact.DefaultArtifact
- All Implemented Interfaces:
Artifact
- Author:
- Mikolaj Izdebski
-
Field Summary
Fields inherited from interface org.fedoraproject.xmvn.artifact.Artifact
DEFAULT_EXTENSION, DEFAULT_VERSION, MF_KEY_ARTIFACTID, MF_KEY_CLASSIFIER, MF_KEY_EXTENSION, MF_KEY_GROUPID, MF_KEY_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultArtifact
(String coords) DefaultArtifact
(String groupId, String artifactId) DefaultArtifact
(String groupId, String artifactId, String version) DefaultArtifact
(String groupId, String artifactId, String extension, String version) DefaultArtifact
(String groupId, String artifactId, String extension, String classifier, String version) DefaultArtifact
(String groupId, String artifactId, String extension, String classifier, String version, Path path) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get artifact identifier of this artifact.Get classifier of this artifact.Get extension of this artifact.Get group identifier of this artifact.getPath()
Get local path of artifact file ornull
if artifact is not resolved (doesn't have associated artifact file).Get version of this artifact.int
hashCode()
Set artifact path.setVersion
(String version) Set artifact version.toString()
-
Constructor Details
-
DefaultArtifact
-
DefaultArtifact
-
DefaultArtifact
-
DefaultArtifact
-
DefaultArtifact
-
DefaultArtifact
-
-
Method Details
-
getGroupId
Description copied from interface:Artifact
Get group identifier of this artifact.- Specified by:
getGroupId
in interfaceArtifact
- Returns:
- artifact group identifier, never
null
.
-
getArtifactId
Description copied from interface:Artifact
Get artifact identifier of this artifact.- Specified by:
getArtifactId
in interfaceArtifact
- Returns:
- artifact identifier, never
null
.
-
getExtension
Description copied from interface:Artifact
Get extension of this artifact.- Specified by:
getExtension
in interfaceArtifact
- Returns:
- artifact extension, never
null
.
-
getClassifier
Description copied from interface:Artifact
Get classifier of this artifact.- Specified by:
getClassifier
in interfaceArtifact
- Returns:
- artifact classifier, never
null
.
-
getVersion
Description copied from interface:Artifact
Get version of this artifact.- Specified by:
getVersion
in interfaceArtifact
- Returns:
- artifact version, never
null
.
-
getPath
Description copied from interface:Artifact
Get local path of artifact file ornull
if artifact is not resolved (doesn't have associated artifact file). -
setVersion
Description copied from interface:Artifact
Set artifact version.Since artifacts are immutable, this method returns a new object and leaves the original unmodified.
- Specified by:
setVersion
in interfaceArtifact
- Parameters:
version
- the new artifact version to set- Returns:
- copy of artifact with the new version set
-
setPath
Description copied from interface:Artifact
Set artifact path.Since artifacts are immutable, this method returns a new object and leaves the original unmodified.
-
toString
-
equals
-
hashCode
public int hashCode()
-