Package com.google.javascript.jscomp
Class NodeTraversal.AbstractNodeTypePruningCallback
java.lang.Object
com.google.javascript.jscomp.NodeTraversal.AbstractNodeTypePruningCallback
- All Implemented Interfaces:
- NodeTraversal.Callback
- Enclosing class:
- NodeTraversal
public abstract static class NodeTraversal.AbstractNodeTypePruningCallback
extends Object
implements NodeTraversal.Callback
Abstract callback to visit a pruned set of nodes.
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractNodeTypePruningCallback(Set<Integer> nodeTypes) Creates an abstract pruned callback.AbstractNodeTypePruningCallback(Set<Integer> nodeTypes, boolean include) Creates an abstract pruned callback.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanshouldTraverse(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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.javascript.jscomp.NodeTraversal.Callbackvisit
- 
Constructor Details- 
AbstractNodeTypePruningCallbackCreates an abstract pruned callback.- Parameters:
- nodeTypes- the nodes to include in the traversal
 
- 
AbstractNodeTypePruningCallbackCreates an abstract pruned callback.- Parameters:
- nodeTypes- the nodes to include/exclude in the traversal
- include- whether to include or exclude the nodes in the traversal
 
 
- 
- 
Method Details- 
shouldTraverseDescription copied from interface: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 post order.Implementations can have side effects (e.g. modifying the parse tree). - Specified by:
- shouldTraversein interface- NodeTraversal.Callback
- Returns:
- whether the children of this node should be visited
 
 
-