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 protectedDelegatingArtifact(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 Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetArtifactId()java.lang.StringgetBaseVersion()java.lang.StringgetClassifier()java.lang.StringgetExtension()java.io.FilegetFile()Deprecated.java.lang.StringgetGroupId()java.nio.file.PathgetPath()java.util.Map<java.lang.String,java.lang.String>getProperties()java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)java.lang.StringgetVersion()inthashCode()booleanisSnapshot()protected abstract DelegatingArtifactnewInstance(org.eclipse.aether.artifact.Artifact delegate)Creates a new artifact instance that delegates to the specified artifact.org.eclipse.aether.artifact.ArtifactsetFile(java.io.File file)Deprecated.org.eclipse.aether.artifact.ArtifactsetPath(java.nio.file.Path path)org.eclipse.aether.artifact.ArtifactsetProperties(java.util.Map<java.lang.String,java.lang.String> properties)org.eclipse.aether.artifact.ArtifactsetVersion(java.lang.String version)java.lang.StringtoString()
-
-
-
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:
setVersionin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
setVersionin classorg.eclipse.aether.artifact.AbstractArtifact
-
getBaseVersion
public java.lang.String getBaseVersion()
- Specified by:
getBaseVersionin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
getBaseVersionin classorg.eclipse.aether.artifact.AbstractArtifact
-
isSnapshot
public boolean isSnapshot()
- Specified by:
isSnapshotin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
isSnapshotin classorg.eclipse.aether.artifact.AbstractArtifact
-
getClassifier
public java.lang.String getClassifier()
-
getExtension
public java.lang.String getExtension()
-
getFile
@Deprecated public java.io.File getFile()
Deprecated.
-
getPath
public java.nio.file.Path getPath()
- Specified by:
getPathin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
getPathin classorg.eclipse.aether.artifact.AbstractArtifact
-
setFile
@Deprecated public org.eclipse.aether.artifact.Artifact setFile(java.io.File file)
Deprecated.- Specified by:
setFilein interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
setFilein classorg.eclipse.aether.artifact.AbstractArtifact
-
setPath
public org.eclipse.aether.artifact.Artifact setPath(java.nio.file.Path path)
- Specified by:
setPathin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
setPathin classorg.eclipse.aether.artifact.AbstractArtifact
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
- Specified by:
getPropertyin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
getPropertyin 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:
setPropertiesin interfaceorg.eclipse.aether.artifact.Artifact- Overrides:
setPropertiesin classorg.eclipse.aether.artifact.AbstractArtifact
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classorg.eclipse.aether.artifact.AbstractArtifact
-
hashCode
public int hashCode()
- Overrides:
hashCodein classorg.eclipse.aether.artifact.AbstractArtifact
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.eclipse.aether.artifact.AbstractArtifact
-
-