public abstract class LetNode extends AbstractSoyNode implements SoyNode.StandaloneNode, SoyNode.StatementNode, SoyNode.LocalVarInlineNode
Important: Do not use outside of Soy code (treat as superpackage-private).
SoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ConditionalBlockNode, SoyNode.ExprHolderNode, SoyNode.Kind, SoyNode.LocalVarBlockNode, SoyNode.LocalVarInlineNode, SoyNode.LocalVarNode, SoyNode.MsgBlockNode, SoyNode.MsgPlaceholderInitialNode, SoyNode.MsgSubstUnitNode, SoyNode.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNode| Modifier and Type | Field and Description |
|---|---|
protected LocalVar |
var
The local variable defined by this node.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LetNode(int id,
SourceLocation sourceLocation,
String localVarName) |
protected |
LetNode(LetNode orig,
CopyState copyState)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCommandName()
Returns the Soy command name.
|
String |
getCommandText()
Returns the command text (may be the empty string).
|
SoyNode.ParentSoyNode<SoyNode.StandaloneNode> |
getParent()
Gets this node's parent.
|
protected String |
getTagString() |
protected String |
getTagString(boolean selfEnding) |
String |
getUniqueVarName()
Gets a unique version of the local var name (e.g.
|
LocalVar |
getVar()
Get the local variable defined by this node.
|
String |
getVarName()
Return The local variable name (without the preceding '$').
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
getId, getSourceLocation, setId, toStringcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopy, getId, getKind, setIdcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParent, toSourceStringprotected final LocalVar var
protected LetNode(int id,
SourceLocation sourceLocation,
String localVarName)
id - The id for this node.sourceLocation - The node's source location.localVarName - The let variable name.public final String getVarName()
getVarName in interface SoyNode.LocalVarNodepublic String getUniqueVarName()
public SoyNode.ParentSoyNode<SoyNode.StandaloneNode> getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic final LocalVar getVar()
getVar in interface SoyNode.LocalVarNodepublic String getCommandName()
SoyNode.CommandNodegetCommandName in interface SoyNode.CommandNodepublic String getCommandText()
SoyNode.CommandNodegetCommandText in interface SoyNode.CommandNodeprotected String getTagString()
protected final String getTagString(boolean selfEnding)
public String toSourceString()
NodeNote: Some nodes do not have a direct mapping to Soy source (such as nodes created during some optimization passes). Thus this method may not always be supported.
toSourceString in interface Node