public final class FindTransitiveDepTemplatesVisitor extends AbstractSoyNodeVisitor<FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo>
Important: Do not use outside of Soy code (treat as superpackage-private).
exec(com.google.template.soy.soytree.SoyNode) should be called on a TemplateNode.
If you need to call this visitor for multiple templates in the same tree (without modifying the tree), it's more efficient to reuse the same instance of this visitor because we memoize results from previous calls to exec.
| Modifier and Type | Class and Description |
|---|---|
static class |
FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo
Return value for
FindTransitiveDepTemplatesVisitor. |
| Constructor and Description |
|---|
FindTransitiveDepTemplatesVisitor(TemplateRegistry templateRegistry) |
| Modifier and Type | Method and Description |
|---|---|
FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo |
exec(SoyNode rootTemplate)
Executes the function defined by this visitor.
|
com.google.common.collect.ImmutableMap<TemplateNode,FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo> |
execOnAllTemplates(SoyFileSetNode soyTree)
Computes transitive dep templates info for all templates in a Soy tree.
|
com.google.common.collect.ImmutableMap<TemplateNode,FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo> |
execOnMultipleTemplates(Iterable<TemplateNode> rootTemplates)
Computes transitive dep templates info for multiple templates.
|
protected void |
visitCallBasicNode(CallBasicNode node) |
protected void |
visitCallDelegateNode(CallDelegateNode node) |
protected void |
visitSoyNode(SoyNode node) |
protected void |
visitTemplateNode(TemplateNode node) |
visit, visitCallNode, visitCallParamContentNode, visitCallParamNode, visitCallParamValueNode, visitChildren, visitChildrenAllowingConcurrentModification, visitDebuggerNode, visitForIfemptyNode, visitForNode, visitForNonemptyNode, visitHtmlAttributeNode, visitHtmlAttributeValueNode, visitHtmlCloseTagNode, visitHtmlCommentNode, visitHtmlOpenTagNode, visitIfCondNode, visitIfElseNode, visitIfNode, visitLetContentNode, visitLetNode, visitLetValueNode, visitLogNode, visitMsgFallbackGroupNode, visitMsgHtmlTagNode, visitMsgNode, visitMsgPlaceholderNode, visitMsgPluralCaseNode, visitMsgPluralDefaultNode, visitMsgPluralNode, visitMsgSelectCaseNode, visitMsgSelectDefaultNode, visitMsgSelectNode, visitMsgSubstUnitNode, visitPrintDirectiveNode, visitPrintNode, visitRawTextNode, visitSoyFileNode, visitSoyFileSetNode, visitSwitchCaseNode, visitSwitchDefaultNode, visitSwitchNode, visitTemplateBasicNode, visitTemplateDelegateNode, visitVeLogNodevisitChildren, visitChildrenAllowingConcurrentModificationpublic FindTransitiveDepTemplatesVisitor(TemplateRegistry templateRegistry)
templateRegistry - Map from template name to TemplateNode to use during the pass.public FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo exec(SoyNode rootTemplate)
Note: This method is not thread-safe. If you need to get transitive dep templates info in a
thread-safe manner, then please use execOnAllTemplates(com.google.template.soy.soytree.SoyFileSetNode)() in a thread-safe manner.
exec in interface NodeVisitor<SoyNode,FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo>exec in class AbstractNodeVisitor<SoyNode,FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo>rootTemplate - The node to execute the function on.public com.google.common.collect.ImmutableMap<TemplateNode,FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo> execOnMultipleTemplates(Iterable<TemplateNode> rootTemplates)
Note: This method returns a map from root template to TransitiveDepTemplatesInfo for the given root templates. If you wish to obtain a single TransitiveDepTemplatesInfo object that contains the combined info for all of the given root templates, then use TransitiveDepTemplatesInfo.merge(resultMap.values()) where resultMap is the result returned by this method.
Note: This method is not thread-safe. If you need to get transitive dep templates info in a
thread-safe manner, then please use execOnAllTemplates(com.google.template.soy.soytree.SoyFileSetNode)() in a thread-safe manner.
rootTemplates - The root templates to compute transitive dep templates info for.public com.google.common.collect.ImmutableMap<TemplateNode,FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo> execOnAllTemplates(SoyFileSetNode soyTree)
Note: This method returns a map from root template to TransitiveDepTemplatesInfo for all templates in the given Soy tree. If you wish to obtain a single TransitiveDepTemplatesInfo object that contains the combined info for all templates in the given Soy tree, then use TransitiveDepTemplatesInfo.merge(resultMap.values()) where resultMap is the result returned by this method.
Note: This method is not thread-safe. If you need to get transitive dep templates info in a thread-safe manner, be sure to call this method only once and then use the precomputed map.
soyTree - A full Soy tree.protected void visitTemplateNode(TemplateNode node)
protected void visitCallBasicNode(CallBasicNode node)
protected void visitCallDelegateNode(CallDelegateNode node)
protected void visitSoyNode(SoyNode node)
visitSoyNode in class AbstractSoyNodeVisitor<FindTransitiveDepTemplatesVisitor.TransitiveDepTemplatesInfo>node - the visited node.