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
ConstructorDescriptionCreates a new visitor that clones the visited nodes. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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)
-
Constructor Details
-
CloningDependencyVisitor
public CloningDependencyVisitor()Creates a new visitor that clones the visited nodes.
-
-
Method Details
-
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 benull
.- Returns:
- The cloned node, never
null
.
-
visitEnter
- Specified by:
visitEnter
in interfaceorg.eclipse.aether.graph.DependencyVisitor
-
visitLeave
- Specified by:
visitLeave
in interfaceorg.eclipse.aether.graph.DependencyVisitor
-