|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.javascript.jscomp.NodeTraversal.AbstractNodeTypePruningCallback
public abstract static class NodeTraversal.AbstractNodeTypePruningCallback
Abstract callback to visit a pruned set of nodes.
Constructor Summary | |
---|---|
NodeTraversal.AbstractNodeTypePruningCallback(Set<Integer> nodeTypes)
Creates an abstract pruned callback. |
|
NodeTraversal.AbstractNodeTypePruningCallback(Set<Integer> nodeTypes,
boolean include)
Creates an abstract pruned callback. |
Method Summary | |
---|---|
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 |
Constructor Detail |
---|
public NodeTraversal.AbstractNodeTypePruningCallback(Set<Integer> nodeTypes)
nodeTypes
- the nodes to include in the traversalpublic NodeTraversal.AbstractNodeTypePruningCallback(Set<Integer> nodeTypes, boolean include)
nodeTypes
- the nodes to include/exclude in the traversalinclude
- whether to include or exclude the nodes in the traversalMethod Detail |
---|
public 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 post order.
Implementations can have side effects (e.g. modifying the parse tree).
shouldTraverse
in interface NodeTraversal.Callback
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |