org.apache.maven.shared.dependency.graph.traversal
Class FilteringDependencyNodeVisitor

java.lang.Object
  extended by 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: FilteringDependencyNodeVisitor.java 1351166 2012-06-17 21:15:54Z hboutemy $
Author:
Mark Hobson

Constructor Summary
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
 boolean endVisit(DependencyNode node)
          Ends the visit to to the specified dependency node.
 DependencyNodeFilter getDependencyNodeFilter()
          Gets the dependency node filter that this visitor applies before delegation.
 DependencyNodeVisitor getDependencyNodeVisitor()
          Gets the dependency node visitor that this visitor delegates to.
 boolean visit(DependencyNode node)
          Starts the visit to the specified dependency node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 to
filter - 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:
visit in interface DependencyNodeVisitor
Parameters:
node - the dependency node to visit
Returns:
true to visit the specified dependency node's children, false to 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:
endVisit in interface DependencyNodeVisitor
Parameters:
node - the dependency node to visit
Returns:
true to visit the specified dependency node's next sibling, false to 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


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.