com.google.template.soy.soytree
Class TemplateBasicNode
java.lang.Object
com.google.template.soy.basetree.AbstractNode
com.google.template.soy.soytree.AbstractSoyNode
com.google.template.soy.soytree.AbstractCommandNode
com.google.template.soy.soytree.AbstractParentCommandNode<SoyNode.StandaloneNode>
com.google.template.soy.soytree.AbstractBlockCommandNode
com.google.template.soy.soytree.TemplateNode
com.google.template.soy.soytree.TemplateBasicNode
- All Implemented Interfaces:
- Node, ParentNode<SoyNode.StandaloneNode>, SoyNode, SoyNode.BlockCommandNode, SoyNode.BlockNode, SoyNode.CommandNode, SoyNode.ParentSoyNode<SoyNode.StandaloneNode>, SoyNode.RenderUnitNode
public class TemplateBasicNode
- extends TemplateNode
Node representing a basic template.
Important: Do not use outside of Soy code (treat as superpackage-private).
| Nested classes/interfaces inherited from interface com.google.template.soy.soytree.SoyNode |
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.ParentSoyNode<N extends SoyNode>, SoyNode.RenderUnitNode, SoyNode.SplitLevelTopNode<N extends SoyNode>, SoyNode.StandaloneNode, SoyNode.StatementNode, SoyNode.SyntaxVersion |
|
Constructor Summary |
|
TemplateBasicNode(int id,
TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
String commandText,
String soyDoc)
Creates a TemplateNode given the source command text. |
|
TemplateBasicNode(int id,
TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
String templateName,
String partialTemplateName,
boolean useAttrStyleForName,
boolean isOverride,
boolean isPrivate,
AutoescapeMode autoescapeMode,
SanitizedContent.ContentKind contentKind,
String soyDoc,
SoyNode.SyntaxVersion syntaxVersion)
Creates a TemplateNode given values for fields. |
protected |
TemplateBasicNode(TemplateBasicNode orig)
Copy constructor. |
| Methods inherited from class com.google.template.soy.soytree.TemplateNode |
clearSoyDocStrings, getAutoescapeMode, getContentKind, getDelPackageName, getParamSrcsWithIncorrectSyntax, getParent, getPartialTemplateName, getSoyDoc, getSoyDocDesc, getSoyDocParams, getSoyFileHeaderInfo, getTemplateName, isPrivate, toSourceString |
| Methods inherited from class com.google.template.soy.soytree.AbstractParentCommandNode |
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, needsEnvFrameDuringInterp, numChildren, removeChild, removeChild, replaceChild, replaceChild, setNeedsEnvFrameDuringInterp, toTreeString |
| Methods inherited from interface com.google.template.soy.basetree.ParentNode |
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild |
TemplateBasicNode
public TemplateBasicNode(int id,
TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
String commandText,
@Nullable
String soyDoc)
throws SoySyntaxException
- Creates a TemplateNode given the source command text.
- Parameters:
id - The id for this node.soyFileHeaderInfo - Info from the containing Soy file's header declarations.commandText - The command text.soyDoc - The full SoyDoc, including the start/end tokens, or null if the template is not
preceded by SoyDoc.
- Throws:
SoySyntaxException - If a syntax error is found.
TemplateBasicNode
public TemplateBasicNode(int id,
TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
String templateName,
@Nullable
String partialTemplateName,
boolean useAttrStyleForName,
boolean isOverride,
boolean isPrivate,
AutoescapeMode autoescapeMode,
SanitizedContent.ContentKind contentKind,
@Nullable
String soyDoc,
SoyNode.SyntaxVersion syntaxVersion)
- Creates a TemplateNode given values for fields.
- Parameters:
soyFileHeaderInfo - Info from the containing Soy file's header declarations.templateName - The full template name.partialTemplateName - The template name without any namespace, or null for templates in
V1 syntax.useAttrStyleForName - true to use an attribute to specify the name.
This is purely cosmetic.isOverride - True iff the template overrides another (false for V2).isPrivate - True iff the template can only be used by other templates from the same fileautoescapeMode - Specifies how {print} commands are escaped.
TemplateBasicNode
protected TemplateBasicNode(TemplateBasicNode orig)
- Copy constructor.
- Parameters:
orig - The node to copy.
getKind
public SoyNode.Kind getKind()
- Description copied from interface:
SoyNode
- Returns this node's kind (corresponding to this node's specific type).
getTemplateNameForUserMsgs
public String getTemplateNameForUserMsgs()
- Description copied from class:
TemplateNode
- Returns a template name suitable for display in user msgs.
- Specified by:
getTemplateNameForUserMsgs in class TemplateNode
isOverride
public boolean isOverride()
- Returns whether this template overrides another (always false for syntax version V2).
clone
public TemplateBasicNode clone()
- Description copied from interface:
Node
- Clones this node. The clone's parent pointer is set to null.
- Specified by:
clone in interface Node- Specified by:
clone in interface SoyNode- Specified by:
clone in class AbstractSoyNode
- Returns:
- A clone of this code.