|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.jpa.rebind.AstInorderTraversal
public class AstInorderTraversal
Facilitates iteration through the nodes of an ANTLR AST. The iteration order is an in-order traversal of the nodes in the tree.
Constructor Summary | |
---|---|
AstInorderTraversal(antlr.collections.AST ast)
Creates a new traversal of the given AST. |
Method Summary | |
---|---|
Deque<antlr.collections.AST> |
context()
Returns the stack of AST nodes that lead from the root of the AST down to the current node that this traverser is positioned on. |
antlr.collections.AST |
fastForwardTo(antlr.collections.AST node)
|
antlr.collections.AST |
fastForwardTo(int nodeType)
|
void |
fastForwardToNextSiblingOf(antlr.collections.AST node)
Advances this iterator past the subtree rooted at the given node. |
boolean |
hasNext()
|
antlr.collections.AST |
next()
|
void |
remove()
Not implemented. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AstInorderTraversal(antlr.collections.AST ast)
ast
- The AST to traverse. Must not be null.Method Detail |
---|
public boolean hasNext()
hasNext
in interface Iterator<antlr.collections.AST>
public antlr.collections.AST next()
next
in interface Iterator<antlr.collections.AST>
public Deque<antlr.collections.AST> context()
p
is the
parent of the node at position p + 1
.public void fastForwardToNextSiblingOf(antlr.collections.AST node)
hasNext()
will return false).
node
- The node to fast-forward past.public antlr.collections.AST fastForwardTo(int nodeType)
public antlr.collections.AST fastForwardTo(antlr.collections.AST node)
public void remove()
remove
in interface Iterator<antlr.collections.AST>
UnsupportedOperationException
- when called
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |