Package com.google.javascript.jscomp
Class NodeTraversal.AbstractShallowCallback
- java.lang.Object
-
- com.google.javascript.jscomp.NodeTraversal.AbstractShallowCallback
-
- All Implemented Interfaces:
NodeTraversal.Callback
- Enclosing class:
- NodeTraversal
public abstract static class NodeTraversal.AbstractShallowCallback extends java.lang.Object implements NodeTraversal.Callback
Abstract callback to visit all nodes but not traverse into function bodies.
-
-
Constructor Summary
Constructors Constructor Description AbstractShallowCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.javascript.jscomp.NodeTraversal.Callback
visit
-
-
-
-
Method Detail
-
shouldTraverse
public final boolean shouldTraverse(NodeTraversal nodeTraversal, Node n, Node parent)
Description copied from interface: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 post order.Implementations can have side effects (e.g. modifying the parse tree).
- Specified by:
shouldTraverse
in interfaceNodeTraversal.Callback
- Returns:
- whether the children of this node should be visited
-
-