Class PostorderDependencyNodeConsumerVisitor
java.lang.Object
org.eclipse.aether.util.graph.visitor.PostorderDependencyNodeConsumerVisitor
- All Implemented Interfaces:
org.eclipse.aether.graph.DependencyVisitor
Processes dependency graph by traversing the graph in postorder. This visitor visits 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.
- Since:
- 2.0.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPostorderDependencyNodeConsumerVisitor
(Consumer<org.eclipse.aether.graph.DependencyNode> nodeConsumer) Creates a new postorder list generator. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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)
-
Field Details
-
NAME
- See Also:
-
nodeConsumer
-
-
Constructor Details
-
PostorderDependencyNodeConsumerVisitor
public PostorderDependencyNodeConsumerVisitor(Consumer<org.eclipse.aether.graph.DependencyNode> nodeConsumer) Creates a new postorder list generator.
-
-
Method Details
-
visitEnter
- Specified by:
visitEnter
in interfaceorg.eclipse.aether.graph.DependencyVisitor
-
visitLeave
- Specified by:
visitLeave
in interfaceorg.eclipse.aether.graph.DependencyVisitor
-
setVisited
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.- Parameters:
node
- The node being visited, must not benull
.- Returns:
true
if the node has not been visited before,false
if the node was already visited.
-