Class CollectingDependencyNodeVisitor

  • All Implemented Interfaces:
    DependencyNodeVisitor

    public class CollectingDependencyNodeVisitor
    extends java.lang.Object
    implements DependencyNodeVisitor
    A dependency node visitor that collects visited nodes for further processing.
    Since:
    1.1
    Version:
    $Id: CollectingDependencyNodeVisitor.java 1684260 2015-06-08 19:57:54Z rfscholte $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<DependencyNode> nodes
      The collected list of nodes.
    • Constructor Summary

      Constructors 
      Constructor Description
      CollectingDependencyNodeVisitor()
      Creates a dependency node visitor that collects visited nodes for further processing.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean endVisit​(DependencyNode node)
      Ends the visit to to the specified dependency node.
      java.util.List<DependencyNode> getNodes()
      Gets the list of collected dependency nodes.
      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
    • Field Detail

      • nodes

        private final java.util.List<DependencyNode> nodes
        The collected list of nodes.
    • Constructor Detail

      • CollectingDependencyNodeVisitor

        public CollectingDependencyNodeVisitor()
        Creates a dependency node visitor that collects visited nodes for further processing.
    • 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
      • getNodes

        public java.util.List<DependencyNode> getNodes()
        Gets the list of collected dependency nodes.
        Returns:
        the list of collected dependency nodes