Class DelegatingArtifact

java.lang.Object
org.eclipse.aether.artifact.AbstractArtifact
org.eclipse.aether.util.artifact.DelegatingArtifact
All Implemented Interfaces:
org.eclipse.aether.artifact.Artifact

public abstract class DelegatingArtifact extends org.eclipse.aether.artifact.AbstractArtifact
An artifact that delegates to another artifact instance. This class serves as a base for subclasses that want to carry additional data fields.
  • Constructor Details

    • DelegatingArtifact

      protected DelegatingArtifact(org.eclipse.aether.artifact.Artifact delegate)
      Creates a new artifact instance that delegates to the specified artifact.
      Parameters:
      delegate - The artifact to delegate to, must not be null.
  • Method Details

    • newInstance

      protected abstract DelegatingArtifact newInstance(org.eclipse.aether.artifact.Artifact delegate)
      Creates a new artifact instance that delegates to the specified artifact. Subclasses should use this hook to instantiate themselves, taking along any data from the current instance that was added.
      Parameters:
      delegate - The artifact to delegate to, must not be null.
      Returns:
      The new delegating artifact, never null.
    • getGroupId

      public String getGroupId()
    • getArtifactId

    • getVersion

      public String getVersion()
    • setVersion

      public org.eclipse.aether.artifact.Artifact setVersion(String version)
      Specified by:
      setVersion in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      setVersion in class org.eclipse.aether.artifact.AbstractArtifact
    • getBaseVersion

      Specified by:
      getBaseVersion in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      getBaseVersion in class org.eclipse.aether.artifact.AbstractArtifact
    • isSnapshot

      public boolean isSnapshot()
      Specified by:
      isSnapshot in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      isSnapshot in class org.eclipse.aether.artifact.AbstractArtifact
    • getClassifier

    • getExtension

      public String getExtension()
    • getFile

      Deprecated.
    • getPath

      public Path getPath()
      Specified by:
      getPath in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      getPath in class org.eclipse.aether.artifact.AbstractArtifact
    • setFile

      @Deprecated public org.eclipse.aether.artifact.Artifact setFile(File file)
      Deprecated.
      Specified by:
      setFile in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      setFile in class org.eclipse.aether.artifact.AbstractArtifact
    • setPath

      public org.eclipse.aether.artifact.Artifact setPath(Path path)
      Specified by:
      setPath in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      setPath in class org.eclipse.aether.artifact.AbstractArtifact
    • getProperty

      public String getProperty(String key, String defaultValue)
      Specified by:
      getProperty in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      getProperty in class org.eclipse.aether.artifact.AbstractArtifact
    • getProperties

    • setProperties

      public org.eclipse.aether.artifact.Artifact setProperties(Map<String,String> properties)
      Specified by:
      setProperties in interface org.eclipse.aether.artifact.Artifact
      Overrides:
      setProperties in class org.eclipse.aether.artifact.AbstractArtifact
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class org.eclipse.aether.artifact.AbstractArtifact
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.eclipse.aether.artifact.AbstractArtifact
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.aether.artifact.AbstractArtifact