Class PreorderDependencyNodeConsumerVisitor

java.lang.Object
org.eclipse.aether.util.graph.visitor.PreorderDependencyNodeConsumerVisitor
All Implemented Interfaces:
org.eclipse.aether.graph.DependencyVisitor

Processes dependency graph by traversing the graph in preorder. 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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected final Consumer<org.eclipse.aether.graph.DependencyNode>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PreorderDependencyNodeConsumerVisitor(Consumer<org.eclipse.aether.graph.DependencyNode> nodeConsumer)
    Creates a new preorder list generator.
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • visitEnter

      public boolean visitEnter(org.eclipse.aether.graph.DependencyNode node)
      Specified by:
      visitEnter in interface org.eclipse.aether.graph.DependencyVisitor
    • visitLeave

      public boolean visitLeave(org.eclipse.aether.graph.DependencyNode node)
      Specified by:
      visitLeave in interface org.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 be null.
      Returns:
      true if the node has not been visited before, false if the node was already visited.