public abstract static class ControlFlowGraph.AbstractCfgNodeTraversalCallback extends java.lang.Object implements NodeTraversal.Callback
For example, traversing an IF node as root will visit the two subtrees
pointed by the ControlFlowGraph.Branch.ON_TRUE and
ControlFlowGraph.Branch.ON_FALSE edges.
| Constructor and Description |
|---|
AbstractCfgNodeTraversalCallback() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldTraverse(NodeTraversal nodeTraversal,
Node n,
Node parent)
Visits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitpublic final boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)
NodeTraversal.CallbackVisits a node in pre order (before visiting its children) and decides
whether this node's children should be traversed. If children are
traversed, they will be visited by
NodeTraversal.Callback.visit(NodeTraversal, Node, Node) in postorder.
Implementations can have side effects (e.g. modifying the parse tree).
shouldTraverse in interface NodeTraversal.CallbackCopyright © 2009-2019 Google. All Rights Reserved.