Class CloningDependencyVisitor

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

public class CloningDependencyVisitor extends Object implements org.eclipse.aether.graph.DependencyVisitor
A dependency visitor that constructs a clone of the visited dependency graph. If such a visitor is passed into a FilteringDependencyVisitor, a sub graph can be created. This class creates shallow clones of the visited dependency nodes (via DefaultDependencyNode(DependencyNode)) but clients can create a subclass and override clone(DependencyNode) to alter the clone process.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new visitor that clones the visited nodes.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.eclipse.aether.graph.DependencyNode
    clone(org.eclipse.aether.graph.DependencyNode node)
    Creates a clone of the specified node.
    final org.eclipse.aether.graph.DependencyNode
    Gets the root node of the cloned dependency graph.
    final boolean
    visitEnter(org.eclipse.aether.graph.DependencyNode node)
     
    final 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
  • Constructor Details

  • Method Details

    • getRootNode

      public final org.eclipse.aether.graph.DependencyNode getRootNode()
      Gets the root node of the cloned dependency graph.
      Returns:
      The root node of the cloned dependency graph or null.
    • clone

      protected org.eclipse.aether.graph.DependencyNode clone(org.eclipse.aether.graph.DependencyNode node)
      Creates a clone of the specified node.
      Parameters:
      node - The node to clone, must not be null.
      Returns:
      The cloned node, never null.
    • visitEnter

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

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