public class RenderVisitor extends AbstractSoyNodeVisitor<Void>
Important: Do not use outside of Soy code (treat as superpackage-private).
The rendered output will be appended to the Appendable provided to the constructor.
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
activeDelPackageNames
The set of active delegate package names.
|
protected SoyCssRenamingMap |
cssRenamingMap
CSS renaming map.
|
protected SoyRecord |
data
The current template data.
|
protected Environment |
env
The current environment.
|
protected EvalVisitor.EvalVisitorFactory |
evalVisitorFactory
Factory for creating an instance of EvalVisitor.
|
protected SoyRecord |
ijData
The current injected data.
|
protected SoyMsgBundle |
msgBundle
The bundle of translated messages, or null to use the messages from the Soy source.
|
protected Deque<Appendable> |
outputBufStack
The stack of output Appendables (current output buffer is top of stack).
|
protected Map<String,SoyJavaPrintDirective> |
soyJavaDirectivesMap
Map of all SoyJavaPrintDirectives (name to directive).
|
protected TemplateRegistry |
templateRegistry
The bundle containing all the templates that may be rendered.
|
protected SoyIdRenamingMap |
xidRenamingMap
xid renaming map.
|
errorReporter| Modifier | Constructor and Description |
|---|---|
protected |
RenderVisitor(Map<String,SoyJavaPrintDirective> soyJavaDirectivesMap,
EvalVisitor.EvalVisitorFactory evalVisitorFactory,
Appendable outputBuf,
ErrorReporter errorReporter,
TemplateRegistry templateRegistry,
SoyRecord data,
SoyRecord ijData,
Set<String> activeDelPackageNames,
SoyMsgBundle msgBundle,
SoyIdRenamingMap xidRenamingMap,
SoyCssRenamingMap cssRenamingMap) |
| Modifier and Type | Method and Description |
|---|---|
protected RenderVisitor |
createHelperInstance(Appendable outputBuf,
SoyRecord data)
Creates a helper instance for rendering a subtemplate.
|
Void |
exec(SoyNode node)
Executes the function defined by this visitor.
|
protected void |
visitCallBasicNode(CallBasicNode node) |
protected void |
visitCallDelegateNode(CallDelegateNode node) |
protected void |
visitCallParamNode(CallParamNode node) |
protected void |
visitCssNode(CssNode node) |
protected void |
visitDebuggerNode(DebuggerNode node) |
protected void |
visitForeachNode(ForeachNode node) |
protected void |
visitForNode(ForNode node) |
protected void |
visitIfNode(IfNode node) |
protected void |
visitLetContentNode(LetContentNode node) |
protected void |
visitLetValueNode(LetValueNode node) |
protected void |
visitLogNode(LogNode node) |
protected void |
visitMsgFallbackGroupNode(MsgFallbackGroupNode node) |
protected void |
visitMsgHtmlTagNode(MsgHtmlTagNode node) |
protected void |
visitPrintNode(PrintNode node) |
protected void |
visitRawTextNode(RawTextNode node) |
protected void |
visitSoyNode(SoyNode node) |
protected void |
visitSwitchNode(SwitchNode node) |
protected void |
visitTemplateNode(TemplateNode node) |
protected void |
visitXidNode(XidNode node) |
visit, visitCallNode, visitCallParamContentNode, visitCallParamValueNode, visitChildren, visitChildrenAllowingConcurrentModification, visitForeachIfemptyNode, visitForeachNonemptyNode, visitGoogMsgDefNode, visitGoogMsgRefNode, visitIfCondNode, visitIfElseNode, visitLetNode, visitLoopNode, visitMsgNode, visitMsgPlaceholderNode, visitMsgPluralCaseNode, visitMsgPluralDefaultNode, visitMsgPluralNode, visitMsgPluralRemainderNode, visitMsgSelectCaseNode, visitMsgSelectDefaultNode, visitMsgSelectNode, visitMsgSubstUnitNode, visitPrintDirectiveNode, visitSoyFileNode, visitSoyFileSetNode, visitSwitchCaseNode, visitSwitchDefaultNode, visitTemplateBasicNode, visitTemplateDelegateNodevisitChildren, visitChildrenAllowingConcurrentModificationprotected final Map<String,SoyJavaPrintDirective> soyJavaDirectivesMap
protected final EvalVisitor.EvalVisitorFactory evalVisitorFactory
protected final TemplateRegistry templateRegistry
protected final SoyRecord data
protected final SoyRecord ijData
protected Environment env
protected final Set<String> activeDelPackageNames
protected final SoyMsgBundle msgBundle
protected final SoyIdRenamingMap xidRenamingMap
protected final SoyCssRenamingMap cssRenamingMap
protected Deque<Appendable> outputBufStack
protected RenderVisitor(Map<String,SoyJavaPrintDirective> soyJavaDirectivesMap, EvalVisitor.EvalVisitorFactory evalVisitorFactory, Appendable outputBuf, ErrorReporter errorReporter, @Nullable TemplateRegistry templateRegistry, SoyRecord data, @Nullable SoyRecord ijData, @Nullable Set<String> activeDelPackageNames, @Nullable SoyMsgBundle msgBundle, @Nullable SoyIdRenamingMap xidRenamingMap, @Nullable SoyCssRenamingMap cssRenamingMap)
soyJavaDirectivesMap - Map of all SoyJavaPrintDirectives (name to directive).evalVisitorFactory - Factory for creating an instance of EvalVisitor.outputBuf - The Appendable to append the output to.templateRegistry - A registry of all templates. Should never be null (except in some unit
tests).data - The current template data.ijData - The current injected data.activeDelPackageNames - The set of active delegate package names. Allowed to be null when
known to be irrelevant.msgBundle - The bundle of translated messages, or null to use the messages from the Soy
source.cssRenamingMap - The CSS renaming map, or null if not applicable.xidRenamingMap - The 'xid' renaming map, or null if not applicable.public Void exec(SoyNode node)
NodeVisitorexec in interface NodeVisitor<SoyNode,Void>exec in class AbstractNodeVisitor<SoyNode,Void>node - The node to execute the function on.protected RenderVisitor createHelperInstance(Appendable outputBuf, SoyRecord data)
outputBuf - The Appendable to append the output to.data - The template data.protected void visitTemplateNode(TemplateNode node)
visitTemplateNode in class AbstractSoyNodeVisitor<Void>protected void visitRawTextNode(RawTextNode node)
visitRawTextNode in class AbstractSoyNodeVisitor<Void>protected void visitMsgFallbackGroupNode(MsgFallbackGroupNode node)
visitMsgFallbackGroupNode in class AbstractSoyNodeVisitor<Void>protected void visitMsgHtmlTagNode(MsgHtmlTagNode node)
visitMsgHtmlTagNode in class AbstractSoyNodeVisitor<Void>protected void visitPrintNode(PrintNode node)
visitPrintNode in class AbstractSoyNodeVisitor<Void>protected void visitXidNode(XidNode node)
visitXidNode in class AbstractSoyNodeVisitor<Void>protected void visitCssNode(CssNode node)
visitCssNode in class AbstractSoyNodeVisitor<Void>protected void visitLetValueNode(LetValueNode node)
visitLetValueNode in class AbstractSoyNodeVisitor<Void>protected void visitLetContentNode(LetContentNode node)
visitLetContentNode in class AbstractSoyNodeVisitor<Void>protected void visitIfNode(IfNode node)
visitIfNode in class AbstractSoyNodeVisitor<Void>protected void visitSwitchNode(SwitchNode node)
visitSwitchNode in class AbstractSoyNodeVisitor<Void>protected void visitForeachNode(ForeachNode node)
visitForeachNode in class AbstractSoyNodeVisitor<Void>protected void visitForNode(ForNode node)
visitForNode in class AbstractSoyNodeVisitor<Void>protected void visitCallBasicNode(CallBasicNode node)
visitCallBasicNode in class AbstractSoyNodeVisitor<Void>protected void visitCallDelegateNode(CallDelegateNode node)
visitCallDelegateNode in class AbstractSoyNodeVisitor<Void>protected void visitCallParamNode(CallParamNode node)
visitCallParamNode in class AbstractSoyNodeVisitor<Void>protected void visitLogNode(LogNode node)
visitLogNode in class AbstractSoyNodeVisitor<Void>protected void visitDebuggerNode(DebuggerNode node)
visitDebuggerNode in class AbstractSoyNodeVisitor<Void>protected void visitSoyNode(SoyNode node)
visitSoyNode in class AbstractSoyNodeVisitor<Void>node - the visited node.