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()
ArtifactgetGroupId in interface Artifactpublic String getArtifactId()
ArtifactgetArtifactId in interface Artifactpublic String getClassifier()
ArtifactgetClassifier in interface Artifactnull.public Version getVersion()
ArtifactgetVersion in interface Artifactpublic String getExtension()
ArtifactgetExtension in interface Artifactpublic Type getType()
DependencygetType in interface Dependencynull.public boolean isSnapshot()
ArtifactisSnapshot in interface Artifacttrue 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()
DependencyDependencyCoordinate based on this Dependency.toCoordinate in interface ArtifacttoCoordinate in interface DependencyDependencyCoordinateSession.createArtifactCoordinate(Artifact)Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.