public final class DependencyPath extends Object
When this represents a path from the root to a leaf of a dependency tree, the first artifact in the path is the root of the tree and the last artifact is the leaf. The sequence of dependencies explains why the leaf is included in the dependency tree.
The first node is null for the dependency trees generated for multiple artifacts by DependencyGraphBuilder.buildFullDependencyGraph(List); otherwise the root node is not null.
| Constructor and Description |
|---|
DependencyPath(org.eclipse.aether.artifact.Artifact root) |
| Modifier and Type | Method and Description |
|---|---|
DependencyPath |
append(org.eclipse.aether.graph.Dependency dependency) |
DependencyPath |
concat(DependencyPath childPath) |
boolean |
equals(Object o) |
org.eclipse.aether.artifact.Artifact |
findExclusion(String groupId,
String artifactId)
Returns the artifact that declares an exclusion element specified for
groupId and
artifactId. |
org.eclipse.aether.artifact.Artifact |
get(int i)
Returns the artifact at
ith node in the path. |
com.google.common.collect.ImmutableList<String> |
getArtifactKeys()
Returns the versionless coordinates of the artifacts in the path.
|
org.eclipse.aether.graph.Dependency |
getDependency(int i)
Returns the
ith dependency. |
org.eclipse.aether.artifact.Artifact |
getLeaf()
Returns the artifact at the end of the path.
|
int |
hashCode() |
int |
size()
Returns the length of the path.
|
String |
toString() |
public DependencyPath(@Nullable org.eclipse.aether.artifact.Artifact root)
public DependencyPath append(org.eclipse.aether.graph.Dependency dependency)
public DependencyPath concat(DependencyPath childPath)
public int size()
public org.eclipse.aether.artifact.Artifact getLeaf()
public com.google.common.collect.ImmutableList<String> getArtifactKeys()
public org.eclipse.aether.artifact.Artifact get(int i)
ith node in the path. The 0th element is the root of
the dependency tree.public org.eclipse.aether.graph.Dependency getDependency(int i)
ith dependency. As root is not a dependency, the 0th
element is the dependency of the root in the path.public org.eclipse.aether.artifact.Artifact findExclusion(String groupId, String artifactId)
groupId and
artifactId. Null if the dependency path does not have such artifact.Copyright © 2018–2021 Google LLC.. All rights reserved.