Package org.eclipse.aether.util.artifact
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 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()
-
-
-
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 benull
.
-
-
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 benull
.- Returns:
- The new delegating artifact, never
null
.
-
getGroupId
public java.lang.String getGroupId()
-
getArtifactId
public java.lang.String getArtifactId()
-
getVersion
public java.lang.String getVersion()
-
setVersion
public org.eclipse.aether.artifact.Artifact setVersion(java.lang.String version)
- Specified by:
setVersion
in interfaceorg.eclipse.aether.artifact.Artifact
- Overrides:
setVersion
in classorg.eclipse.aether.artifact.AbstractArtifact
-
getBaseVersion
public java.lang.String getBaseVersion()
- Specified by:
getBaseVersion
in interfaceorg.eclipse.aether.artifact.Artifact
- Overrides:
getBaseVersion
in classorg.eclipse.aether.artifact.AbstractArtifact
-
isSnapshot
public boolean isSnapshot()
- Specified by:
isSnapshot
in interfaceorg.eclipse.aether.artifact.Artifact
- Overrides:
isSnapshot
in classorg.eclipse.aether.artifact.AbstractArtifact
-
getClassifier
public java.lang.String getClassifier()
-
getExtension
public java.lang.String getExtension()
-
getFile
public java.io.File getFile()
-
setFile
public org.eclipse.aether.artifact.Artifact setFile(java.io.File file)
- Specified by:
setFile
in interfaceorg.eclipse.aether.artifact.Artifact
- Overrides:
setFile
in classorg.eclipse.aether.artifact.AbstractArtifact
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
- Specified by:
getProperty
in interfaceorg.eclipse.aether.artifact.Artifact
- Overrides:
getProperty
in classorg.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 interfaceorg.eclipse.aether.artifact.Artifact
- Overrides:
setProperties
in classorg.eclipse.aether.artifact.AbstractArtifact
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classorg.eclipse.aether.artifact.AbstractArtifact
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classorg.eclipse.aether.artifact.AbstractArtifact
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.eclipse.aether.artifact.AbstractArtifact
-
-