public final class MsgPlaceholderNode extends AbstractParentSoyNode<SoyNode.StandaloneNode> implements SoyNode.MsgSubstUnitNode
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.LoopNode, SoyNode.MsgBlockNode, SoyNode.MsgPlaceholderInitialNode, SoyNode.MsgSubstUnitNode, SoyNode.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNodeSPACES| Constructor and Description |
|---|
MsgPlaceholderNode(int id,
SoyNode.MsgPlaceholderInitialNode initialNode) |
| Modifier and Type | Method and Description |
|---|---|
MsgPlaceholderNode |
clone()
Copies this node.
|
String |
getBaseVarName()
Returns the base placeholder name (what the translator sees).
|
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 node and the given other node are the same, such that they should be
represented by the same placeholder.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild, toTreeStringgetId, getSourceLocation, setId, toStringcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParentequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toTreeStringaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildpublic MsgPlaceholderNode(int id,
SoyNode.MsgPlaceholderInitialNode initialNode)
id - The id for this node.initialNode - Will be set as the only child of this node being created. The child is
the node that represents the content of this placeholder. It is called the initial node
because it may be modified/replaced later by compiler passes.public SoyNode.Kind getKind()
SoyNodepublic String getBaseVarName()
getBaseVarName in interface SoyNode.MsgSubstUnitNodepublic boolean shouldUseSameVarNameAs(SoyNode.MsgSubstUnitNode other)
shouldUseSameVarNameAs in interface SoyNode.MsgSubstUnitNodeother - The other substitution unit to check against.public String toSourceString()
NodetoSourceString in interface Nodepublic SoyNode.MsgBlockNode getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.MsgSubstUnitNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic MsgPlaceholderNode 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.