public final class MsgHtmlTagNode extends AbstractParentSoyNode<SoyNode.StandaloneNode> implements SoyNode.MsgPlaceholderInitialNode
msg statement/block.
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 | Method and Description |
|---|---|
MsgHtmlTagNode |
copy(CopyState copyState)
Copies this node.
|
static MsgHtmlTagNode |
fromNode(int id,
HtmlTagNode tagNode,
ErrorReporter errorReporter)
Creates a
MsgHtmlTagNode from a HtmlTagNode. |
String |
genBasePhName()
Generates the base placeholder name for this node.
|
Object |
genSamenessKey()
Generates the key object used in comparisons to determine whether two placeholder nodes
should be represented by the same placeholder.
|
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type).
|
String |
getLcTagName()
Returns the lower-case HTML tag name (includes '/' for end tags).
|
SoyNode.BlockNode |
getParent()
Gets this node's parent.
|
String |
getUserSuppliedPhExample()
Gets the user-supplied placeholder example, or null if not supplied or not applicable.
|
String |
getUserSuppliedPhName()
Gets the user-supplied placeholder name, or null if not supplied or not applicable.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildgetId, getSourceLocation, setId, toStringcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParentaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildpublic static MsgHtmlTagNode fromNode(int id, HtmlTagNode tagNode, ErrorReporter errorReporter)
MsgHtmlTagNode from a HtmlTagNode.
If the node contains a phname attribute, it will be removed from the node
and used as the placeholder name, it will _not_ be rendered.
public SoyNode.Kind getKind()
SoyNodepublic String getLcTagName()
@Nullable public String getUserSuppliedPhName()
SoyNode.MsgPlaceholderInitialNodegetUserSuppliedPhName in interface SoyNode.MsgPlaceholderInitialNode@Nullable public String getUserSuppliedPhExample()
SoyNode.MsgPlaceholderInitialNodegetUserSuppliedPhExample in interface SoyNode.MsgPlaceholderInitialNodepublic String genBasePhName()
SoyNode.MsgPlaceholderInitialNodegenBasePhName in interface SoyNode.MsgPlaceholderInitialNodepublic Object genSamenessKey()
SoyNode.MsgPlaceholderInitialNodegenSamenessKey in interface SoyNode.MsgPlaceholderInitialNodepublic 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 Nodepublic SoyNode.BlockNode getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic MsgHtmlTagNode copy(CopyState copyState)
SoyNodeAll copy() overrides should follow this contract:
{@literal @}Override public T copy(CopyState copyState) {
return new T(this, copyState);
}
TODO(lukes): The usecases for a copy method are few and far between. Making the AST nodes immutable (or at least unmodifiable) would be preferable to maintaining our copy() methods.
Don't clone nodes unless you know what you're doing. The Soy AST is not actually a tree (it contains back edges from variables to their definitions), and naively copying nodes can result in pointers into stale ASTs
The copied nodes will have the same ids as the original nodes. If you need to copy a subtree
with new ids assigned to the copied nodes, use SoyTreeUtils.cloneWithNewIds(T, com.google.template.soy.base.internal.IdGenerator).