public final class ForNode extends AbstractBlockCommandNode implements SoyNode.StandaloneNode, SoyNode.StatementNode, SoyNode.ConditionalBlockNode, SoyNode.LoopNode, SoyNode.ExprHolderNode, SoyNode.LocalVarBlockNode
Important: Do not use outside of Soy code (treat as superpackage-private).
SPACES| Constructor and Description |
|---|
ForNode(int id,
String commandText,
SourceLocation sourceLocation,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
ForNode |
clone()
Copies this node.
|
List<ExprUnion> |
getAllExprUnions()
Returns the list of expressions in this node.
|
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type).
|
SoyNode.BlockNode |
getParent()
Gets this node's parent.
|
List<ExprRootNode<?>> |
getRangeArgs()
Returns the parsed range args.
|
List<String> |
getRangeArgTexts()
Returns the texts of the individual range args (sort of canonicalized).
|
LocalVar |
getVar() |
String |
getVarName()
Returns the name of this node's local variable (without the preceding '$').
|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild, toSourceString, toTreeStringbuildTagStringHelper, buildTagStringHelper, getCommandName, getCommandText, getTagStringgetId, getSourceLocation, setId, setSourceLocation, toStringcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParentequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toSourceString, toTreeStringgetCommandName, getCommandText, getTagStringpublic ForNode(int id,
String commandText,
SourceLocation sourceLocation,
ErrorReporter errorReporter)
id - The id for this node.commandText - The command text.sourceLocation - The source location for the for node.errorReporter - For reporting errors.public SoyNode.Kind getKind()
SoyNodepublic final LocalVar getVar()
public final String getVarName()
SoyNode.LocalVarNodegetVarName in interface SoyNode.LocalVarNodepublic List<String> getRangeArgTexts()
public List<ExprRootNode<?>> getRangeArgs()
public List<ExprUnion> getAllExprUnions()
SoyNode.ExprHolderNodegetAllExprUnions in interface SoyNode.ExprHolderNodepublic SoyNode.BlockNode getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic ForNode clone()
NodeAll clone() overrides should follow this contract:
{@literal @}Override public T clone() {
return new T(this);
}
NOTE: this means we do not ultimately delegate to Object.clone(), ever.
TODO(lukes): The usecases for a clone method are few and far between. Making the AST nodes immutable (or at least unmodifiable) would be preferable to maintaining our clone() methods.