Class CloningDependencyVisitor

  • All Implemented Interfaces:
    org.eclipse.aether.graph.DependencyVisitor

    public class CloningDependencyVisitor
    extends java.lang.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
      CloningDependencyVisitor()
      Creates a new visitor that clones the visited nodes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      org.eclipse.aether.graph.DependencyNode getRootNode()
      Gets the root node of the cloned dependency graph.
      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
    • Constructor Detail

    • Method Detail

      • 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