|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.aether.util.graph.AbstractDepthFirstNodeListGenerator
public abstract class AbstractDepthFirstNodeListGenerator
Abstract base class for depth first dependency tree traversers. Subclasses of this visitor will visit each node
exactly once regardless how many paths within the dependency graph lead to the node such that the resulting node
sequence is free of duplicates.
Actual vertex ordering (preorder, inorder, postorder) needs to be defined by subclasses through appropriate
implementations for visitEnter(org.sonatype.aether.graph.DependencyNode) and
visitLeave(org.sonatype.aether.graph.DependencyNode)
| Field Summary | |
|---|---|
protected List<DependencyNode> |
nodes
|
| Constructor Summary | |
|---|---|
AbstractDepthFirstNodeListGenerator()
|
|
| Method Summary | |
|---|---|
List<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<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. |
List<DependencyNode> |
getNodes()
Gets the list of dependency nodes that was generated during the graph traversal. |
protected boolean |
setVisited(DependencyNode node)
Marks the specified node as being visited and determines whether the node has been visited before. |
abstract boolean |
visitEnter(DependencyNode node)
|
abstract boolean |
visitLeave(DependencyNode node)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final List<DependencyNode> nodes
| Constructor Detail |
|---|
public AbstractDepthFirstNodeListGenerator()
| Method Detail |
|---|
public List<DependencyNode> getNodes()
null.public List<Dependency> getDependencies(boolean includeUnresolved)
includeUnresolved - Whether unresolved dependencies shall be included in the result or not.
null.public List<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.protected boolean setVisited(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 abstract boolean visitEnter(DependencyNode node)
visitEnter in interface DependencyVisitorpublic abstract boolean visitLeave(DependencyNode node)
visitLeave in interface DependencyVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||