static class ExpandJqueryAliases.FindCallbackArgumentReferences extends NodeTraversal.AbstractPostOrderCallback implements NodeTraversal.ScopedCallback
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
keyName |
private java.util.List<Node> |
keyReferences |
private Scope |
startingScope |
private java.lang.String |
valueName |
private java.util.List<Node> |
valueReferences |
Constructor and Description |
---|
FindCallbackArgumentReferences(Node functionRoot,
java.util.List<Node> keyReferences,
java.util.List<Node> valueReferences,
boolean useArrayMode) |
Modifier and Type | Method and Description |
---|---|
void |
enterScope(NodeTraversal t)
As we enter each scope, make sure that the scope doesn't define
a local variable with the same name as our original callback method
parameter names.
|
void |
exitScope(NodeTraversal t)
Called immediately before exiting a scope.
|
private boolean |
isShadowed(java.lang.String name,
Scope scope) |
void |
visit(NodeTraversal t,
Node n,
Node parent)
Visits a node in postorder (after its children have been visited).
|
shouldTraverse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shouldTraverse
private final java.lang.String keyName
private final java.lang.String valueName
private Scope startingScope
private java.util.List<Node> keyReferences
private java.util.List<Node> valueReferences
private boolean isShadowed(java.lang.String name, Scope scope)
public void visit(NodeTraversal t, Node n, Node parent)
NodeTraversal.Callback
Visits a node in postorder (after its children have been visited).
A node is visited only if all its parents should be traversed
(NodeTraversal.Callback.shouldTraverse(NodeTraversal, Node, Node)
).
Implementations can have side effects (e.g. modifying the parse tree).
visit
in interface NodeTraversal.Callback
public void enterScope(NodeTraversal t)
enterScope
in interface NodeTraversal.ScopedCallback
public void exitScope(NodeTraversal t)
NodeTraversal.ScopedCallback
exitScope
in interface NodeTraversal.ScopedCallback