public class CloningDependencyVisitor extends Object implements DependencyVisitor
FilteringDependencyVisitor, a sub graph can be created. This class creates shallow clones of the visited
dependency nodes but clients can create a subclass and override clone(DependencyNode) to alter the clone
process.| Constructor and Description |
|---|
CloningDependencyVisitor()
Creates a new visitor that clones the visited nodes.
|
| Modifier and Type | Method and Description |
|---|---|
protected DependencyNode |
clone(DependencyNode node)
Creates a clone of the specified node.
|
DependencyNode |
getRootNode()
Gets the root node of the cloned dependency graph.
|
boolean |
visitEnter(DependencyNode node)
Notifies the visitor of a node visit before its children have been processed.
|
boolean |
visitLeave(DependencyNode node)
Notifies the visitor of a node visit after its children have been processed.
|
public CloningDependencyVisitor()
public DependencyNode getRootNode()
null.protected DependencyNode clone(DependencyNode node)
node - The node to clone, must not be null.null.public boolean visitEnter(DependencyNode node)
DependencyVisitorvisitEnter in interface DependencyVisitornode - The dependency node being visited, must not be null.true to visit child nodes of the specified node as well, false to skip children.public boolean visitLeave(DependencyNode node)
DependencyVisitorvisitLeave in interface DependencyVisitornode - The dependency node being visited, must not be null.true to visit siblings nodes of the specified node as well, false to skip siblings.Copyright © 2010-2014 Sonatype, Inc.. All Rights Reserved.