Class 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 Summary

      Constructors 
      Modifier Constructor Description
      protected DelegatingArtifact​(org.eclipse.aether.artifact.Artifact delegate)
      Creates a new artifact instance that delegates to the specified artifact.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getArtifactId()  
      java.lang.String getBaseVersion()  
      java.lang.String getClassifier()  
      java.lang.String getExtension()  
      java.io.File getFile()  
      java.lang.String getGroupId()  
      java.util.Map<java.lang.String,​java.lang.String> getProperties()  
      java.lang.String getProperty​(java.lang.String key, java.lang.String defaultValue)  
      java.lang.String getVersion()  
      int hashCode()  
      boolean isSnapshot()  
      protected abstract DelegatingArtifact newInstance​(org.eclipse.aether.artifact.Artifact delegate)
      Creates a new artifact instance that delegates to the specified artifact.
      org.eclipse.aether.artifact.Artifact setFile​(java.io.File file)  
      org.eclipse.aether.artifact.Artifact setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)  
      org.eclipse.aether.artifact.Artifact setVersion​(java.lang.String version)  
      java.lang.String toString()  
      • Methods inherited from class org.eclipse.aether.artifact.AbstractArtifact

        copyProperties
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • 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 java.lang.String getGroupId()
      • getVersion

        public java.lang.String getVersion()
      • setVersion

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

        public java.lang.String 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
      • getFile

        public java.io.File getFile()
      • setFile

        public org.eclipse.aether.artifact.Artifact setFile​(java.io.File file)
        Specified by:
        setFile in interface org.eclipse.aether.artifact.Artifact
        Overrides:
        setFile in class org.eclipse.aether.artifact.AbstractArtifact
      • getProperty

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

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
      • setProperties

        public org.eclipse.aether.artifact.Artifact setProperties​(java.util.Map<java.lang.String,​java.lang.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​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class org.eclipse.aether.artifact.AbstractArtifact