public abstract static class ControlFlowGraph.AbstractCfgNodeTraversalCallback extends 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, wait
visit
public final boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)
NodeTraversal.Callback
Visits 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.Callback
Copyright © 2009-2015 Google. All Rights Reserved.