public class DefaultDependency extends Object implements Dependency
Constructor and Description |
---|
DefaultDependency(AbstractSession session,
org.eclipse.aether.graph.Dependency dependency) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getArtifactId()
The artifactId of the artifact.
|
String |
getClassifier()
The classifier of the artifact.
|
org.eclipse.aether.graph.Dependency |
getDependency() |
String |
getExtension()
The file extension of the artifact.
|
String |
getGroupId()
The groupId of the artifact.
|
Scope |
getScope() |
Type |
getType()
The artifact type.
|
Version |
getVersion()
The version of the artifact.
|
int |
hashCode() |
boolean |
isOptional() |
boolean |
isSnapshot()
Determines whether this artifact uses a snapshot version.
|
String |
key()
Returns a unique identifier for this artifact.
|
DependencyCoordinate |
toCoordinate()
Creates a
DependencyCoordinate based on this Dependency . |
String |
toString() |
public DefaultDependency(@Nonnull AbstractSession session, @Nonnull org.eclipse.aether.graph.Dependency dependency)
public String key()
Artifact
@Nonnull public org.eclipse.aether.graph.Dependency getDependency()
public String getGroupId()
Artifact
getGroupId
in interface Artifact
public String getArtifactId()
Artifact
getArtifactId
in interface Artifact
public String getClassifier()
Artifact
getClassifier
in interface Artifact
null
.public Version getVersion()
Artifact
getVersion
in interface Artifact
public String getExtension()
Artifact
getExtension
in interface Artifact
public Type getType()
Dependency
getType
in interface Dependency
null
.public boolean isSnapshot()
Artifact
isSnapshot
in interface Artifact
true
if the artifact is a snapshot, false
otherwise.Session.isVersionSnapshot(String)
@Nonnull public Scope getScope()
getScope
in interface Dependency
@Nullable public boolean isOptional()
isOptional
in interface Dependency
@Nonnull public DependencyCoordinate toCoordinate()
Dependency
DependencyCoordinate
based on this Dependency
.toCoordinate
in interface Artifact
toCoordinate
in interface Dependency
DependencyCoordinate
Session.createArtifactCoordinate(Artifact)
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.