N - A more specific subinterface of Node, or just Node if not applicable.R - The return type of this visitor.public abstract class AbstractNodeVisitor<N extends Node,R> extends Object implements NodeVisitor<N,R>
AbstractXxxNodeVisitor classes.
Same as AbstractReturningNodeVisitor except that in this class, internal visit() calls do not return a value.
Important: Do not use outside of Soy code (treat as superpackage-private).
AbstractReturningNodeVisitor| Constructor and Description |
|---|
AbstractNodeVisitor() |
| Modifier and Type | Method and Description |
|---|---|
R |
exec(N node)
Executes the function defined by this visitor.
|
protected abstract void |
visit(N node)
Visits the given node to execute the function defined by this visitor.
|
protected void |
visitChildren(ParentNode<? extends N> node)
Helper to visit all the children of a node, in order.
|
protected void |
visitChildrenAllowingConcurrentModification(ParentNode<? extends N> node)
Helper to visit all the children of a node, in order.
|
public R exec(N node)
NodeVisitorexec in interface NodeVisitor<N extends Node,R>node - The node to execute the function on.protected abstract void visit(N node)
node - The node to visit.protected void visitChildren(ParentNode<? extends N> node)
node - The parent node whose children to visit.visitChildrenAllowingConcurrentModification(com.google.template.soy.basetree.ParentNode<? extends N>)protected void visitChildrenAllowingConcurrentModification(ParentNode<? extends N> node)
This method differs from visitChildren in that we are iterating through a copy of
the children. Thus, concurrent modification of the list of children is allowed.
node - The parent node whose children to visit.visitChildren(com.google.template.soy.basetree.ParentNode<? extends N>)