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 com.google.common.base.Predicate<String> |
activeDelPackageSelector
The predicate for testing whether a given delpackage is active.
|
protected SoyCssRenamingMap |
cssRenamingMap
CSS renaming map.
|
protected SoyRecord |
data
The current template data.
|
protected boolean |
debugSoyTemplateInfo
Configures if we should render additional HTML comments for runtime insepction.
|
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 TemplateRegistry |
templateRegistry
The bundle containing all the templates that may be rendered.
|
protected SoyIdRenamingMap |
xidRenamingMap
xid renaming map.
|
| Constructor and Description |
|---|
RenderVisitor(EvalVisitor.EvalVisitorFactory evalVisitorFactory,
Appendable outputBuf,
TemplateRegistry templateRegistry,
SoyRecord data,
SoyRecord ijData,
com.google.common.base.Predicate<String> activeDelPackageSelector,
SoyMsgBundle msgBundle,
SoyIdRenamingMap xidRenamingMap,
SoyCssRenamingMap cssRenamingMap,
boolean debugSoyTemplateInfo) |
| 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 |
visitDebuggerNode(DebuggerNode 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 |
visitVeLogNode(VeLogNode node) |
visit, visitCallNode, visitCallParamContentNode, visitCallParamValueNode, visitChildren, visitChildrenAllowingConcurrentModification, visitForIfemptyNode, visitForNonemptyNode, visitHtmlAttributeNode, visitHtmlAttributeValueNode, visitHtmlCloseTagNode, visitHtmlCommentNode, visitHtmlOpenTagNode, visitIfCondNode, visitIfElseNode, visitLetNode, visitMsgNode, visitMsgPlaceholderNode, visitMsgPluralCaseNode, visitMsgPluralDefaultNode, visitMsgPluralNode, visitMsgSelectCaseNode, visitMsgSelectDefaultNode, visitMsgSelectNode, visitMsgSubstUnitNode, visitPrintDirectiveNode, visitSoyFileNode, visitSoyFileSetNode, visitSwitchCaseNode, visitSwitchDefaultNode, visitTemplateBasicNode, visitTemplateDelegateNodevisitChildren, visitChildrenAllowingConcurrentModificationprotected final EvalVisitor.EvalVisitorFactory evalVisitorFactory
protected final TemplateRegistry templateRegistry
protected final SoyRecord data
protected final SoyRecord ijData
protected Environment env
protected final com.google.common.base.Predicate<String> activeDelPackageSelector
protected final SoyMsgBundle msgBundle
protected final SoyIdRenamingMap xidRenamingMap
protected final SoyCssRenamingMap cssRenamingMap
protected boolean debugSoyTemplateInfo
protected Deque<Appendable> outputBufStack
public RenderVisitor(EvalVisitor.EvalVisitorFactory evalVisitorFactory, Appendable outputBuf, @Nullable TemplateRegistry templateRegistry, SoyRecord data, @Nullable SoyRecord ijData, @Nullable com.google.common.base.Predicate<String> activeDelPackageSelector, @Nullable SoyMsgBundle msgBundle, @Nullable SoyIdRenamingMap xidRenamingMap, @Nullable SoyCssRenamingMap cssRenamingMap, boolean debugSoyTemplateInfo)
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.activeDelPackageSelector - The predicate for testing whether a given delpackage is active.
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 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 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 visitVeLogNode(VeLogNode node)
visitVeLogNode 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.