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: FilteringDependencyNodeVisitor.java 1595642 2014-05-18 17:32:08Z jvanzyl $
Author:
Mark Hobson
  • Constructor Details

    • 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 Details

    • 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