public final class VarNode extends AbstractExprNode
Important: Do not use outside of Soy code (treat as superpackage-private).
Important: This type of node never appears in expression parse trees. It is only created if you explicitly parse an input as a variable using ExpressionParser.parseVariable().
ExprNode.ConstantNode, ExprNode.Kind, ExprNode.OperatorNode, ExprNode.ParentExprNode, ExprNode.PrimitiveNode| Modifier and Type | Field and Description |
|---|---|
static VarNode |
ERROR |
SPACES| Constructor and Description |
|---|
VarNode(String name,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
VarNode |
copy(CopyState copyState)
See
Node.copy(CopyState) for a description of the copy contract. |
ExprNode.Kind |
getKind()
Gets this node's kind (corresponding to this node's specific type).
|
String |
getName()
Returns the variable name (without the dollar sign).
|
SoyType |
getType()
Gets the data type of this node.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
getParent, getSourceLocationcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParentpublic static final VarNode ERROR
public VarNode(String name, SourceLocation sourceLocation)
name - The variable name (without the dollar sign).sourceLocation - The node's source location.public ExprNode.Kind getKind()
ExprNodepublic SoyType getType()
ExprNodepublic String getName()
public String toSourceString()
Nodepublic VarNode copy(CopyState copyState)
ExprNodeNode.copy(CopyState) for a description of the copy contract.