Class FilteringDependencyNodeVisitor
- java.lang.Object
-
- org.apache.maven.shared.dependency.graph.traversal.FilteringDependencyNodeVisitor
-
- All Implemented Interfaces:
DependencyNodeVisitor
public class FilteringDependencyNodeVisitor extends Object implements DependencyNodeVisitor
A dependency node visitor that filters nodes and delegates to another visitor.- Since:
- 1.1
- Version:
- $Id$
- Author:
- Mark Hobson
-
-
Constructor Summary
Constructors Constructor Description FilteringDependencyNodeVisitor(DependencyNodeVisitor visitor, DependencyNodeFilter filter)Creates a dependency node visitor that delegates nodes that are accepted by the specified filter to the specified visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanendVisit(DependencyNode node)Ends the visit to to the specified dependency node.DependencyNodeFiltergetDependencyNodeFilter()Gets the dependency node filter that this visitor applies before delegation.DependencyNodeVisitorgetDependencyNodeVisitor()Gets the dependency node visitor that this visitor delegates to.booleanvisit(DependencyNode node)Starts the visit to the specified dependency node.
-
-
-
Constructor Detail
-
FilteringDependencyNodeVisitor
public FilteringDependencyNodeVisitor(DependencyNodeVisitor visitor, DependencyNodeFilter filter)
Creates a dependency node visitor that delegates nodes that are accepted by the specified filter to the specified visitor.- Parameters:
visitor- the dependency node visitor to delegate tofilter- the dependency node filter to apply before delegation
-
-
Method Detail
-
visit
public boolean visit(DependencyNode node)
Starts the visit to the specified dependency node.- Specified by:
visitin interfaceDependencyNodeVisitor- Parameters:
node- the dependency node to visit- Returns:
trueto visit the specified dependency node's children,falseto skip the specified dependency node's children and proceed to its next sibling
-
endVisit
public boolean endVisit(DependencyNode node)
Ends the visit to to the specified dependency node.- Specified by:
endVisitin interfaceDependencyNodeVisitor- Parameters:
node- the dependency node to visit- Returns:
trueto visit the specified dependency node's next sibling,falseto skip the specified dependency node's next siblings and proceed to its parent
-
getDependencyNodeVisitor
public DependencyNodeVisitor getDependencyNodeVisitor()
Gets the dependency node visitor that this visitor delegates to.- Returns:
- the dependency node visitor
-
getDependencyNodeFilter
public DependencyNodeFilter getDependencyNodeFilter()
Gets the dependency node filter that this visitor applies before delegation.- Returns:
- the dependency node filter
-
-