| Modifier and Type | Field and Description |
|---|---|
| private static final Comparator | COMPARATOR
Comparator that orders nodes by ascending begin offset. |
| private final int | |
| private final int | |
| private final Class | |
| private final TreeSet |
| Access | Constructor and Description |
|---|---|
| pack-priv | OffsetOrderVisitor(Class<T>
the type of nodes to collect nodeClass, int the lowest begin offset to accept (inclusive) low, int the highest end offset to accept (exclusive) high)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv SortedSet | |
| public boolean | skipChildren(Visitable
the node to process node)Implements org. Method that is called to indicate whether we should skip all nodes below this node for traversal. |
| public boolean | stopTraversal()
Implements org. Method that is called to see if query tree traversal should be stopped before visiting all nodes. |
| public Visitable | visit(Visitable
the node to process node)Implements org. This is the default visit operation on a QueryTreeNode. |
| public boolean | visitChildrenFirst(Visitable
the top node of a sub-tree about to be visited node)Implements org. Method that is called to see if |
| COMPARATOR | back to summary |
|---|---|
| private static final Comparator<QueryTreeNode> COMPARATOR Comparator that orders nodes by ascending begin offset. | |
| highOffset | back to summary |
|---|---|
| private final int highOffset | |
| lowOffset | back to summary |
|---|---|
| private final int lowOffset | |
| nodeClass | back to summary |
|---|---|
| private final Class<T> nodeClass | |
| nodes | back to summary |
|---|---|
| private final TreeSet<T> nodes | |
| OffsetOrderVisitor | back to summary |
|---|---|
| pack-priv OffsetOrderVisitor(Class<T> nodeClass, int low, int high) Create a new
| |
| getNodes | back to summary |
|---|---|
| pack-priv SortedSet | |
| skipChildren | back to summary |
|---|---|
| public boolean skipChildren(Visitable node) throws StandardException Implements org. Doc from org. Method that is called to indicate whether we should skip all nodes below this node for traversal. Useful if we want to effectively ignore/prune all branches under a particular node. Differs from stopTraversal() in that it only affects subtrees, rather than the entire traversal. | |
| stopTraversal | back to summary |
|---|---|
| public boolean stopTraversal() Implements org. Doc from org. 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.
| |
| visit | back to summary |
|---|---|
| public Visitable visit(Visitable node) throws StandardException Implements org. Doc from org. This is the default visit operation on a QueryTreeNode. It just returns the node. This will typically suffice as the default visit operation for most visitors unless the visitor needs to count the number of nodes visited or something like that. Visitors will overload this method by implementing a version with a signature that matches a specific type of node. For example, if I want to do something special with aggregate nodes, then that Visitor will implement a visit(AggregateNode node) method which does the aggregate specific processing.
| |
| visitChildrenFirst | back to summary |
|---|---|
| public boolean visitChildrenFirst(Visitable node) Implements org. Doc from org. Method that is called to see if | |