Class DefaultArtifact

java.lang.Object
org.fedoraproject.xmvn.artifact.DefaultArtifact
All Implemented Interfaces:
Artifact

public final class DefaultArtifact extends Object implements Artifact
Author:
Mikolaj Izdebski
  • Constructor Details

  • Method Details

    • getGroupId

      public String getGroupId()
      Description copied from interface: Artifact
      Get group identifier of this artifact.
      Specified by:
      getGroupId in interface Artifact
      Returns:
      artifact group identifier, never null.
    • getArtifactId

      public String getArtifactId()
      Description copied from interface: Artifact
      Get artifact identifier of this artifact.
      Specified by:
      getArtifactId in interface Artifact
      Returns:
      artifact identifier, never null.
    • getExtension

      public String getExtension()
      Description copied from interface: Artifact
      Get extension of this artifact.
      Specified by:
      getExtension in interface Artifact
      Returns:
      artifact extension, never null.
    • getClassifier

      public String getClassifier()
      Description copied from interface: Artifact
      Get classifier of this artifact.
      Specified by:
      getClassifier in interface Artifact
      Returns:
      artifact classifier, never null.
    • getVersion

      public String getVersion()
      Description copied from interface: Artifact
      Get version of this artifact.
      Specified by:
      getVersion in interface Artifact
      Returns:
      artifact version, never null.
    • getPath

      public Path getPath()
      Description copied from interface: Artifact
      Get local path of artifact file or null if artifact is not resolved (doesn't have associated artifact file).
      Specified by:
      getPath in interface Artifact
      Returns:
      artifact file path, can be null.
    • setVersion

      public Artifact setVersion(String version)
      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 interface Artifact
      Parameters:
      version - the new artifact version to set
      Returns:
      copy of artifact with the new version set
    • setPath

      public Artifact setPath(Path path)
      Description copied from interface: Artifact
      Set artifact path.

      Since artifacts are immutable, this method returns a new object and leaves the original unmodified.

      Specified by:
      setPath in interface Artifact
      Parameters:
      path - the new artifact path to set
      Returns:
      copy of artifact with the new path set
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object