public final class TreeDependencyVisitor extends java.lang.Object implements DependencyVisitor
Modifier and Type | Field and Description |
---|---|
private java.util.Map<DependencyNode,java.lang.Object> |
visitedNodes |
private DependencyVisitor |
visitor |
private Stack<java.lang.Boolean> |
visits |
Constructor and Description |
---|
TreeDependencyVisitor(DependencyVisitor visitor)
Creates a new visitor that delegates to the specified visitor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
visitEnter(DependencyNode node)
Notifies the visitor of a node visit before its children have been processed.
|
boolean |
visitLeave(DependencyNode node)
Notifies the visitor of a node visit after its children have been processed.
|
private final java.util.Map<DependencyNode,java.lang.Object> visitedNodes
private final DependencyVisitor visitor
private final Stack<java.lang.Boolean> visits
public TreeDependencyVisitor(DependencyVisitor visitor)
visitor
- The visitor to delegate to, must not be null
.public boolean visitEnter(DependencyNode node)
DependencyVisitor
visitEnter
in interface DependencyVisitor
node
- The dependency node being visited, must not be null
.true
to visit child nodes of the specified node as well, false
to skip children.public boolean visitLeave(DependencyNode node)
DependencyVisitor
visitLeave
in interface DependencyVisitor
node
- The dependency node being visited, must not be null
.true
to visit siblings nodes of the specified node as well, false
to skip siblings.