public class TemplateDelegateNodeBuilder extends TemplateNodeBuilder
Important: Do not use outside of Soy code (treat as superpackage-private).
TemplateNodeBuilder.DeclInfocmdText, errorReporter, id, isMarkedV1, isSoyDocSet, params, soyDoc, soyDocDesc, soyFileHeaderInfo, syntaxVersionBound, templateNameForUserMsgs, visibility| Constructor and Description |
|---|
TemplateDelegateNodeBuilder(TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
SourceLocation sourceLocation,
ErrorReporter errorReporter) |
TemplateDelegateNodeBuilder(TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
SourceLocation sourceLocation,
ErrorReporter errorReporter,
SoyTypeRegistry typeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
TemplateDelegateNodeBuilder |
addParams(Iterable<? extends TemplateParam> allParams)
Helper for
setSoyDoc() and setHeaderDecls(). |
TemplateDelegateNode |
build()
Builds the template node.
|
TemplateDelegateNodeBuilder |
setCmdText(String cmdText)
Sets the command text for the node to be built.
|
TemplateDelegateNodeBuilder |
setCmdTextInfo(String delTemplateName,
String delTemplateVariant,
TemplateNode.Priority delPriority,
AutoescapeMode autoescapeMode,
SanitizedContent.ContentKind contentKind,
com.google.common.collect.ImmutableList<String> requiredCssNamespaces)
Alternative to
setCmdText() that sets command text info directly as opposed to having
it parsed from the command text string. |
TemplateDelegateNodeBuilder |
setHeaderDecls(TemplateNodeBuilder.DeclInfo... declInfos)
Sets the template header decls.
|
TemplateDelegateNodeBuilder |
setId(int id)
Sets the id for the node to be built.
|
TemplateDelegateNodeBuilder |
setSoyDoc(String soyDoc)
Sets the SoyDoc for the node to be built.
|
getAutoescapeMode, getContentKind, getCssBaseNamespace, getPartialTemplateName, getRequiredCssNamespaces, getTemplateName, getTemplateNameForUserMsgs, setAutoescapeCmdText, setAutoescapeInfo, setCssBaseCmdText, setCssBaseNamespace, setHeaderDecls, setRequireCssCmdText, setRequiredCssNamespaces, setTemplateNames, setV1Markerpublic TemplateDelegateNodeBuilder(TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo, SourceLocation sourceLocation, ErrorReporter errorReporter)
soyFileHeaderInfo - Info from the containing Soy file's header declarations.sourceLocation - The template's source location.public TemplateDelegateNodeBuilder(TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo, SourceLocation sourceLocation, ErrorReporter errorReporter, SoyTypeRegistry typeRegistry)
soyFileHeaderInfo - Info from the containing Soy file's header declarations.sourceLocation - The template's source location.public TemplateDelegateNodeBuilder setId(int id)
TemplateNodeBuildersetId in class TemplateNodeBuilderpublic TemplateDelegateNodeBuilder setCmdText(String cmdText)
TemplateNodeBuildersetCmdText in class TemplateNodeBuilderpublic TemplateDelegateNodeBuilder setCmdTextInfo(String delTemplateName, String delTemplateVariant, TemplateNode.Priority delPriority, AutoescapeMode autoescapeMode, SanitizedContent.ContentKind contentKind, com.google.common.collect.ImmutableList<String> requiredCssNamespaces)
setCmdText() that sets command text info directly as opposed to having
it parsed from the command text string. The cmdText field will be set to a canonical string
generated from the given info.delTemplateName - The delegate template name.delTemplateVariant - The delegate template variant.delPriority - The delegate priority.autoescapeMode - The mode of autoescaping for this template.contentKind - Strict mode context. Nonnull iff autoescapeMode is strict.requiredCssNamespaces - CSS namespaces required to render the template.public TemplateDelegateNodeBuilder setSoyDoc(String soyDoc)
TemplateNodeBuildersetSoyDoc in class TemplateNodeBuilderpublic TemplateDelegateNodeBuilder setHeaderDecls(TemplateNodeBuilder.DeclInfo... declInfos)
TemplateNodeBuildersetHeaderDecls in class TemplateNodeBuilderdeclInfos - DeclInfo objects for the decls found in the template header.public TemplateDelegateNodeBuilder addParams(Iterable<? extends TemplateParam> allParams)
TemplateNodeBuildersetSoyDoc() and setHeaderDecls(). This method is intended to be
called at most once for SoyDoc params and at most once for header params.addParams in class TemplateNodeBuilderallParams - The params to add.public TemplateDelegateNode build()
TemplateNodeBuilderbuild in class TemplateNodeBuilder