org.sonatype.aether.util.artifact
Class DelegatingArtifact
java.lang.Object
org.sonatype.aether.util.artifact.AbstractArtifact
org.sonatype.aether.util.artifact.DelegatingArtifact
- All Implemented Interfaces:
- Artifact
public abstract class DelegatingArtifact
- extends 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 |
protected |
DelegatingArtifact(Artifact delegate)
Creates a new artifact instance that delegates to the specified artifact. |
DelegatingArtifact
protected DelegatingArtifact(Artifact delegate)
- Creates a new artifact instance that delegates to the specified artifact.
- Parameters:
delegate - The artifact to delegate to, must not be null.
newInstance
protected abstract DelegatingArtifact newInstance(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
public String getArtifactId()
getVersion
public String getVersion()
setVersion
public Artifact setVersion(String version)
- Specified by:
setVersion in interface Artifact- Overrides:
setVersion in class AbstractArtifact
getBaseVersion
public String getBaseVersion()
isSnapshot
public boolean isSnapshot()
getClassifier
public String getClassifier()
getExtension
public String getExtension()
getFile
public File getFile()
setFile
public Artifact setFile(File file)
- Specified by:
setFile in interface Artifact- Overrides:
setFile in class AbstractArtifact
getProperty
public String getProperty(String key,
String defaultValue)
getProperties
public Map<String,String> getProperties()
setProperties
public Artifact setProperties(Map<String,String> properties)
- Specified by:
setProperties in interface Artifact- Overrides:
setProperties in class AbstractArtifact
equals
public boolean equals(Object obj)
- Overrides:
equals in class AbstractArtifact
hashCode
public int hashCode()
- Overrides:
hashCode in class AbstractArtifact
toString
public String toString()
- Overrides:
toString in class AbstractArtifact
Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.