public final class MsgSelectNode extends AbstractParentCommandNode<CaseOrDefaultNode> implements SoyNode.MsgSubstUnitNode, SoyNode.SplitLevelTopNode<CaseOrDefaultNode>, SoyNode.ExprHolderNode
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
static class |
MsgSelectNode.Builder
Builder for
MsgSelectNode. |
SoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ConditionalBlockNode, SoyNode.ExprHolderNode, SoyNode.Kind, SoyNode.LocalVarBlockNode, SoyNode.LocalVarInlineNode, SoyNode.LocalVarNode, SoyNode.LoopNode, 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 |
|---|---|
static String |
FALLBACK_BASE_SELECT_VAR_NAME
Fallback base select var name.
|
SPACES| Constructor and Description |
|---|
MsgSelectNode(int id,
ExprRootNode<?> selectExpr,
String baseSelectVarName) |
| Modifier and Type | Method and Description |
|---|---|
MsgSelectNode |
clone()
Copies this node.
|
List<ExprUnion> |
getAllExprUnions()
Returns the list of expressions in this node.
|
String |
getBaseVarName()
Returns the base select var name (what the translator sees).
|
ExprRootNode<?> |
getExpr()
Returns the expression for the value to select on.
|
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type).
|
SoyNode.MsgBlockNode |
getParent()
Gets this node's parent.
|
boolean |
shouldUseSameVarNameAs(SoyNode.MsgSubstUnitNode other)
Returns whether this substitution unit should use the same var name as another substitution
unit.
|
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, waitgetId, getSourceLocation, setId, setSourceLocationaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toSourceString, toTreeStringpublic static final String FALLBACK_BASE_SELECT_VAR_NAME
public MsgSelectNode(int id,
ExprRootNode<?> selectExpr,
@Nullable
String baseSelectVarName)
id - The id for this node.selectExpr - The expression for the value to select on.baseSelectVarName - The base select var name to use (what the translator sees), or null if
it should be generated from the select expression.public SoyNode.Kind getKind()
SoyNodepublic ExprRootNode<?> getExpr()
public String getBaseVarName()
getBaseVarName in interface SoyNode.MsgSubstUnitNodepublic boolean shouldUseSameVarNameAs(SoyNode.MsgSubstUnitNode other)
SoyNode.MsgSubstUnitNodeshouldUseSameVarNameAs in interface SoyNode.MsgSubstUnitNodeother - The other substitution unit to check against.public List<ExprUnion> getAllExprUnions()
SoyNode.ExprHolderNodegetAllExprUnions in interface SoyNode.ExprHolderNodepublic SoyNode.MsgBlockNode getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.MsgSubstUnitNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic MsgSelectNode 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.