public abstract class TemplateNode extends AbstractBlockCommandNode implements SoyNode.RenderUnitNode
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateNode.SoyFileHeaderInfo
Info from the containing Soy file's
delpackage and namespace declarations. |
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 int |
MAX_PRIORITY
Priorities range from 0 to MAX_PRIORITY, inclusive.
|
SPACES| Modifier | Constructor and Description |
|---|---|
protected |
TemplateNode(TemplateNode orig)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearSoyDocStrings()
Clears the SoyDoc text, description, and param descriptions.
|
StackTraceElement |
createStackTraceElement(SourceLocation srcLocation)
Construct a StackTraceElement that will point to the given source location of the current
template.
|
Iterable<TemplateParam> |
getAllParams()
Returns all params from template header or SoyDoc, both regular and injected.
|
AutoescapeMode |
getAutoescapeMode()
Returns the mode of autoescaping, if any, done for this template.
|
SanitizedContent.ContentKind |
getContentKind()
Returns the content kind for strict autoescaping.
|
String |
getCssBaseNamespace()
Returns the base CSS namespace for resolving package-relative class names.
|
String |
getDelPackageName()
Returns the name of the containing delegate package, or null if none.
|
List<TemplateParam> |
getInjectedParams()
Returns the injected params from template header.
|
int |
getMaxLocalVariableTableSize() |
List<TemplateParam> |
getParams()
Returns the params from template header or SoyDoc.
|
SoyFileNode |
getParent()
Gets this node's parent.
|
String |
getPartialTemplateName()
Returns this template's partial name.
|
com.google.common.collect.ImmutableList<String> |
getRequiredCssNamespaces()
Returns required CSS namespaces.
|
String |
getSoyDoc()
Returns the SoyDoc, or null.
|
String |
getSoyDocDesc()
Returns the description portion of the SoyDoc (before @param tags), or null.
|
TemplateNode.SoyFileHeaderInfo |
getSoyFileHeaderInfo()
Returns info from the containing Soy file's header declarations.
|
String |
getTemplateName()
Returns this template's name.
|
String |
getTemplateNameForUserMsgs()
Returns a template name suitable for display in user msgs.
|
Visibility |
getVisibility()
Returns the visibility of this template.
|
void |
setMaxLocalVariableTableSize(int size) |
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, toTreeStringbuildTagStringHelper, buildTagStringHelper, getCommandName, getCommandText, getTagStringclone, getId, getSourceLocation, setId, setSourceLocation, toStringcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParentequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCommandName, getCommandText, getTagStringclone, getId, getKind, getSourceLocation, setId, setSourceLocationaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toTreeStringpublic static final int MAX_PRIORITY
protected TemplateNode(TemplateNode orig)
orig - The node to copy.public TemplateNode.SoyFileHeaderInfo getSoyFileHeaderInfo()
public String getDelPackageName()
public String getTemplateNameForUserMsgs()
public String getTemplateName()
@Nullable public String getPartialTemplateName()
public Visibility getVisibility()
public AutoescapeMode getAutoescapeMode()
@Nullable public SanitizedContent.ContentKind getContentKind()
getContentKind in interface SoyNode.RenderUnitNodepublic com.google.common.collect.ImmutableList<String> getRequiredCssNamespaces()
public String getCssBaseNamespace()
public void setMaxLocalVariableTableSize(int size)
public int getMaxLocalVariableTableSize()
public void clearSoyDocStrings()
public String getSoyDoc()
public String getSoyDocDesc()
public List<TemplateParam> getParams()
public List<TemplateParam> getInjectedParams()
@Nullable public Iterable<TemplateParam> getAllParams()
public SoyFileNode getParent()
Nodepublic String toSourceString()
NodetoSourceString in interface NodetoSourceString in class AbstractParentCommandNode<SoyNode.StandaloneNode>public StackTraceElement createStackTraceElement(SourceLocation srcLocation)