|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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
public abstract class TemplateNode
Node representing a template.
Important: Do not use outside of Soy code (treat as superpackage-private).
| Nested Class Summary | |
|---|---|
protected static class |
TemplateNode.CommandTextInfo
Private helper class used by constructors. |
static class |
TemplateNode.SoyDocParam
Info for a parameter declaration in the SoyDoc. |
static class |
TemplateNode.SoyFileHeaderInfo
Info from the containing Soy file's delpackage and namespace declarations. |
| 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 |
| Field Summary | |
|---|---|
static int |
MAX_PRIORITY
Priorities range from 0 to MAX_PRIORITY, inclusive. |
| Fields inherited from class com.google.template.soy.basetree.AbstractNode |
|---|
SPACES |
| Constructor Summary | |
|---|---|
protected |
TemplateNode(int id,
TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
String commandName,
TemplateNode.CommandTextInfo commandTextInfo,
String soyDoc)
Protected constructor for use by subclasses. |
protected |
TemplateNode(TemplateNode orig)
Copy constructor. |
| Method Summary | |
|---|---|
void |
clearSoyDocStrings()
Clears the SoyDoc text, description, and param descriptions. |
AutoescapeMode |
getAutoescapeMode()
Returns the mode of autoescaping, if any, done for this template. |
SanitizedContent.ContentKind |
getContentKind()
Returns the content kind for strict autoescaping. |
String |
getDelPackageName()
Returns the name of the containing delegate package, or null if none. |
com.google.common.collect.ImmutableList<String> |
getParamSrcsWithIncorrectSyntax()
Returns the param source strings with incorrect syntax, or null if no SoyDoc. |
SoyFileNode |
getParent()
Gets this node's parent. |
String |
getPartialTemplateName()
Returns this template's partial name. |
String |
getSoyDoc()
Returns the SoyDoc, or null. |
String |
getSoyDocDesc()
Returns the description portion of the SoyDoc (before @param tags), or null. |
List<TemplateNode.SoyDocParam> |
getSoyDocParams()
Returns the parameters listed in the SoyDoc, or null if no SoyDoc. |
TemplateNode.SoyFileHeaderInfo |
getSoyFileHeaderInfo()
Returns info from the containing Soy file's header declarations. |
String |
getTemplateName()
Returns this template's name. |
abstract String |
getTemplateNameForUserMsgs()
Returns a template name suitable for display in user msgs. |
boolean |
isPrivate()
Returns whether this template is private. |
String |
toSourceString()
Builds a Soy source string that could be the source for this node. |
| 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 class com.google.template.soy.soytree.AbstractCommandNode |
|---|
buildTagStringHelper, buildTagStringHelper, getCommandName, getCommandText, getTagString |
| Methods inherited from class com.google.template.soy.soytree.AbstractSoyNode |
|---|
clone, getId, getSourceLocation, getSyntaxVersion, maybeSetSyntaxVersion, setId, setSourceLocation, toString |
| Methods inherited from class com.google.template.soy.basetree.AbstractNode |
|---|
getNearestAncestor, hasAncestor, setParent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.template.soy.soytree.SoyNode.CommandNode |
|---|
getCommandName, getCommandText, getTagString |
| Methods inherited from interface com.google.template.soy.soytree.SoyNode.ParentSoyNode |
|---|
needsEnvFrameDuringInterp, setNeedsEnvFrameDuringInterp |
| Methods inherited from interface com.google.template.soy.soytree.SoyNode |
|---|
clone, getId, getKind, getSourceLocation, getSyntaxVersion, setId, setSourceLocation |
| 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 |
| Methods inherited from interface com.google.template.soy.basetree.Node |
|---|
getNearestAncestor, hasAncestor, setParent, toTreeString |
| Field Detail |
|---|
public static final int MAX_PRIORITY
| Constructor Detail |
|---|
protected TemplateNode(int id,
TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
String commandName,
TemplateNode.CommandTextInfo commandTextInfo,
@Nullable
String soyDoc)
id - The id for this node.soyFileHeaderInfo - Info from the containing Soy file's header declarations.commandName - The command name, either template or deltemplate.commandTextInfo - All the info derived from the command text.soyDoc - The full SoyDoc, including the start/end tokens, or null if the template is notprotected TemplateNode(TemplateNode orig)
orig - The node to copy.| Method Detail |
|---|
public TemplateNode.SoyFileHeaderInfo getSoyFileHeaderInfo()
public String getDelPackageName()
public abstract String getTemplateNameForUserMsgs()
public String getTemplateName()
public String getPartialTemplateName()
public boolean isPrivate()
public AutoescapeMode getAutoescapeMode()
@Nullable public SanitizedContent.ContentKind getContentKind()
getContentKind in interface SoyNode.RenderUnitNodepublic void clearSoyDocStrings()
public String getSoyDoc()
public String getSoyDocDesc()
public List<TemplateNode.SoyDocParam> getSoyDocParams()
public com.google.common.collect.ImmutableList<String> getParamSrcsWithIncorrectSyntax()
public SoyFileNode getParent()
Node
getParent in interface NodegetParent in interface SoyNodegetParent in class AbstractSoyNodepublic String toSourceString()
Node
toSourceString in interface NodetoSourceString in class AbstractParentCommandNode<SoyNode.StandaloneNode>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||