public abstract class AbstractDependencyVisitor extends Object implements org.eclipse.aether.graph.DependencyVisitor
addIgnores(Collection)
. Inspired
from AbstractDepthFirstNodeListGenerator
Modifier and Type | Field and Description |
---|---|
protected List<org.eclipse.aether.graph.DependencyNode> |
ignores |
protected Map<String,org.eclipse.aether.graph.DependencyNode> |
nodesMap |
protected List<String> |
scopes |
Constructor and Description |
---|
AbstractDependencyVisitor(List<String> scopes) |
Modifier and Type | Method and Description |
---|---|
void |
addIgnores(Collection<? extends org.eclipse.aether.graph.DependencyNode> nodesToIgnore) |
protected abstract void |
doVisit(org.eclipse.aether.graph.DependencyNode node,
boolean newNode)
Actions to perform when visiting a node.
|
List<org.eclipse.aether.artifact.Artifact> |
getArtifacts(boolean includeUnresolved)
Gets the artifacts associated with the list of dependency nodes generated during the graph traversal.
|
String |
getClassPath()
Gets a class path by concatenating the artifact files of the visited dependency nodes.
|
List<org.eclipse.aether.graph.Dependency> |
getDependencies(boolean includeUnresolved)
Gets the dependencies seen during the graph traversal.
|
List<File> |
getFiles()
Gets the files of resolved artifacts seen during the graph traversal.
|
Collection<org.eclipse.aether.graph.DependencyNode> |
getNodes()
Gets the list of dependency nodes that was generated during the graph traversal.
|
protected boolean |
setVisited(org.eclipse.aether.graph.DependencyNode node)
Marks the specified node as being visited and determines whether the node has been visited before.
|
boolean |
visitEnter(org.eclipse.aether.graph.DependencyNode node) |
boolean |
visitLeave(org.eclipse.aether.graph.DependencyNode node)
Note that method is always called, even if
doVisit(DependencyNode, boolean) was not. |
protected final List<org.eclipse.aether.graph.DependencyNode> ignores
public Collection<org.eclipse.aether.graph.DependencyNode> getNodes()
null
.public void addIgnores(Collection<? extends org.eclipse.aether.graph.DependencyNode> nodesToIgnore)
nodesToIgnore
- Nodes to ignore during the visitprotected boolean setVisited(org.eclipse.aether.graph.DependencyNode node)
node
- The node being visited, must not be null
.true
if the node has not been visited before, false
if the node was already visited.public boolean visitEnter(org.eclipse.aether.graph.DependencyNode node)
visitEnter
in interface org.eclipse.aether.graph.DependencyVisitor
protected abstract void doVisit(org.eclipse.aether.graph.DependencyNode node, boolean newNode)
ignores
.newNode
- True if visiting the node for the first timepublic boolean visitLeave(org.eclipse.aether.graph.DependencyNode node)
doVisit(DependencyNode, boolean)
was not. Check
ignores
if needed.visitLeave
in interface org.eclipse.aether.graph.DependencyVisitor
public List<org.eclipse.aether.graph.Dependency> getDependencies(boolean includeUnresolved)
includeUnresolved
- Whether unresolved dependencies shall be included in the result or not.null
.public List<org.eclipse.aether.artifact.Artifact> getArtifacts(boolean includeUnresolved)
includeUnresolved
- Whether unresolved artifacts shall be included in the result or not.null
.public List<File> getFiles()
null
.public String getClassPath()
null
.Copyright © 2016 Nuxeo SA. All Rights Reserved.