Class ReferencedTablesVisitor

  • All Implemented Interfaces:
    Visitor

    class ReferencedTablesVisitor
    extends java.lang.Object
    implements Visitor
    Build a JBitSet of all of the referenced tables in the tree.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private JBitSet tableMap  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) JBitSet getTableMap()  
      boolean skipChildren​(Visitable node)
      No need to go below a Predicate or ResultSet.
      boolean stopTraversal()
      Method that is called to see if query tree traversal should be stopped before visiting all nodes.
      Visitable visit​(Visitable node)
      Don't do anything unless we have a ColumnReference, Predicate or ResultSetNode node.
      boolean visitChildrenFirst​(Visitable node)
      Method that is called to see if visit() should be called on the children of node before it is called on node itself.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tableMap

        private JBitSet tableMap
    • Constructor Detail

      • ReferencedTablesVisitor

        ReferencedTablesVisitor​(JBitSet tableMap)
    • Method Detail

      • skipChildren

        public boolean skipChildren​(Visitable node)
        No need to go below a Predicate or ResultSet.
        Specified by:
        skipChildren in interface Visitor
        Parameters:
        node - the node to process
        Returns:
        Whether or not to go below the node.
      • visitChildrenFirst

        public boolean visitChildrenFirst​(Visitable node)
        Description copied from interface: Visitor
        Method that is called to see if visit() should be called on the children of node before it is called on node itself. If this method always returns true, the visitor will walk the tree bottom-up. If it always returns false, the tree is visited top-down.
        Specified by:
        visitChildrenFirst in interface Visitor
        Parameters:
        node - the top node of a sub-tree about to be visited
        Returns:
        true if node's children should be visited before node, false otherwise
      • stopTraversal

        public boolean stopTraversal()
        Description copied from interface: Visitor
        Method that is called to see if query tree traversal should be stopped before visiting all nodes. Useful for short circuiting traversal if we already know we are done.
        Specified by:
        stopTraversal in interface Visitor
        Returns:
        true/false
      • getTableMap

        JBitSet getTableMap()