public class TemplateBasicNodeBuilder extends TemplateNodeBuilder
Important: Do not use outside of Soy code (treat as superpackage-private).
cmdText, COMMON_ATTRIBUTE_NAMES, errorReporter, id, isMarkedV1, params, soyDoc, soyDocDesc, soyFileHeaderInfo, strictHtmlDisabled, syntaxVersionBound, visibility| Constructor and Description |
|---|
TemplateBasicNodeBuilder(TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
TemplateBasicNodeBuilder |
addParams(Iterable<? extends TemplateParam> allParams)
Helper for
setSoyDoc() and setHeaderDecls(). |
TemplateBasicNode |
build()
Builds the template node.
|
TemplateBasicNodeBuilder |
setCmdTextInfo(String templateName,
String partialTemplateName,
Visibility visibility,
AutoescapeMode autoescapeMode,
SanitizedContentKind 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. |
TemplateNodeBuilder |
setCommandValues(Identifier templateName,
List<CommandTagAttribute> attrs)
Set the parsed data from the command tag.
|
TemplateBasicNodeBuilder |
setId(int id)
Sets the id for the node to be built.
|
TemplateBasicNodeBuilder |
setSourceLocation(SourceLocation location)
Sets the source location.
|
TemplateBasicNodeBuilder |
setSoyDoc(String soyDoc,
SourceLocation soyDocLocation)
Sets the SoyDoc for the node to be built.
|
getAutoescapeMode, getContentKind, getCssBaseNamespace, getPartialTemplateName, getRequiredCssNamespaces, getStrictHtmlDisabled, getTemplateName, markDeprecatedV1, setAutoescapeInfo, setCommonCommandValues, setCssBaseNamespace, setRequiredCssNamespaces, setTemplateNamespublic TemplateBasicNodeBuilder(TemplateNode.SoyFileHeaderInfo soyFileHeaderInfo, ErrorReporter errorReporter)
soyFileHeaderInfo - Info from the containing Soy file's header declarations.public TemplateBasicNodeBuilder setId(int id)
TemplateNodeBuildersetId in class TemplateNodeBuilderpublic TemplateBasicNodeBuilder setSourceLocation(SourceLocation location)
TemplateNodeBuildersetSourceLocation in class TemplateNodeBuilderpublic TemplateNodeBuilder setCommandValues(Identifier templateName, List<CommandTagAttribute> attrs)
TemplateNodeBuildersetCommandValues in class TemplateNodeBuildertemplateName - The template nameattrs - The attributes that are set on the tag {e.g. kind="strict"}public TemplateBasicNodeBuilder setCmdTextInfo(String templateName, @Nullable String partialTemplateName, Visibility visibility, AutoescapeMode autoescapeMode, SanitizedContentKind 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.templateName - This template's name.partialTemplateName - This template's partial name. Only applicable for V2; null for V1.visibility - Visibility of this template.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 TemplateBasicNodeBuilder setSoyDoc(String soyDoc, SourceLocation soyDocLocation)
TemplateNodeBuildersetSoyDoc in class TemplateNodeBuilderpublic TemplateBasicNodeBuilder 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 TemplateNodeBuilderpublic TemplateBasicNode build()
TemplateNodeBuilderbuild in class TemplateNodeBuilder