Class BuildingDependencyNodeVisitor
java.lang.Object
org.apache.maven.shared.dependency.graph.traversal.BuildingDependencyNodeVisitor
- All Implemented Interfaces:
DependencyNodeVisitor
A dependency node visitor that clones visited nodes into a new dependency tree. This can be used in conjunction with
a dependency node filter to construct subtrees.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stack
<DependencyNode> The resultant tree parent nodes for the currently visited node.private DependencyNode
The root node of the resultant tree.private final DependencyNodeVisitor
The dependency node visitor to apply on the resultant dependency tree, ornull
for none. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a dependency node visitor that clones visited nodes into a new dependency tree.Creates a dependency node visitor that clones visited nodes into a new dependency tree, and then applies the specified dependency node visitor on the resultant dependency tree. -
Method Summary
Modifier and TypeMethodDescriptionboolean
endVisit
(DependencyNode node) Ends the visit to to the specified dependency node.Gets the dependency node visitor that this visitor applies on the resultant dependency tree.Gets the root node of the resultant dependency tree constructed by this visitor.boolean
visit
(DependencyNode node) Starts the visit to the specified dependency node.
-
Field Details
-
visitor
The dependency node visitor to apply on the resultant dependency tree, ornull
for none. -
parentNodes
The resultant tree parent nodes for the currently visited node. -
rootNode
The root node of the resultant tree.
-
-
Constructor Details
-
BuildingDependencyNodeVisitor
public BuildingDependencyNodeVisitor()Creates a dependency node visitor that clones visited nodes into a new dependency tree.
-
-
Method Details
-
getDependencyNodeVisitor
Gets the dependency node visitor that this visitor applies on the resultant dependency tree.- Returns:
- the dependency node visitor, or
null
for none
-
getDependencyTree
Gets the root node of the resultant dependency tree constructed by this visitor.- Returns:
- the root node, or
null
if the source tree has not yet been visited