public abstract class CallNode extends AbstractParentCommandNode<CallParamNode> implements SoyNode.StandaloneNode, SoyNode.SplitLevelTopNode<CallParamNode>, SoyNode.StatementNode, SoyNode.ExprHolderNode, SoyNode.MsgPlaceholderInitialNode
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CallNode.CommandTextInfo
Private helper class used by constructors.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
FALLBACK_BASE_PLACEHOLDER_NAME
Fallback base placeholder name.
|
SPACES| Modifier | Constructor and Description |
|---|---|
protected |
CallNode(CallNode orig)
Copy constructor.
|
protected |
CallNode(int id,
String commandName,
CallNode.CommandTextInfo commandTextInfo,
com.google.common.collect.ImmutableList<String> escapingDirectiveNames)
Protected constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
String |
genBasePhName()
Generates the base placeholder name for this node.
|
Object |
genSamenessKey()
Generates the key object used in comparisons to determine whether two placeholder nodes
should be represented by the same placeholder.
|
List<ExprUnion> |
getAllExprUnions()
Returns the list of expressions in this node.
|
ExprRootNode<?> |
getDataExpr()
Returns the expression for the data to pass, or null if not applicable.
|
com.google.common.collect.ImmutableList<String> |
getEscapingDirectiveNames()
Returns the escaping directives, applied from left to right.
|
Collection<TemplateParam> |
getParamsToRuntimeCheck(TemplateNode callee)
Returns the subset of
params of the callee that require runtime
type checking when this node is being rendered. |
SoyNode.BlockNode |
getParent()
Gets this node's parent.
|
String |
getTagString()
Builds a Soy tag string that could be the Soy tag for this node.
|
String |
getUserSuppliedPhName()
Gets the user-supplied placeholder name, or null if not supplied or not applicable.
|
boolean |
isPassingAllData()
Returns whether we're passing all of the data (i.e.
|
boolean |
isPassingData()
Returns whether we're passing any part of the data (i.e.
|
protected static Pair<Boolean,ExprRootNode<?>> |
parseDataAttributeHelper(String dataAttr,
ErrorReporter errorReporter)
Private helper function for subclass constructors to parse the 'data' attribute.
|
void |
setEscapingDirectiveNames(com.google.common.collect.ImmutableList<String> escapingDirectiveNames)
Sets the inferred escaping directives.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
addChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild, toTreeStringbuildTagStringHelper, buildTagStringHelper, getCommandName, getCommandTextclone, getId, getSourceLocation, setId, setSourceLocation, toStringcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParentequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChildpublic static final String FALLBACK_BASE_PLACEHOLDER_NAME
protected CallNode(int id,
String commandName,
CallNode.CommandTextInfo commandTextInfo,
com.google.common.collect.ImmutableList<String> escapingDirectiveNames)
id - The id for this node.commandTextInfo - All the info derived from the command text.escapingDirectiveNames - Call-site escaping directives used by strict autoescaping.
This is inferred by the autoescaper and not part of the syntax, and thus is not in the
CommandTextInfo.protected CallNode(CallNode orig)
orig - The node to copy.protected static Pair<Boolean,ExprRootNode<?>> parseDataAttributeHelper(String dataAttr, ErrorReporter errorReporter)
dataAttr - The 'data' attribute in a call.errorReporter - For reporting syntax errors.public boolean isPassingData()
public boolean isPassingAllData()
@Nullable public ExprRootNode<?> getDataExpr()
public String getUserSuppliedPhName()
SoyNode.MsgPlaceholderInitialNodegetUserSuppliedPhName in interface SoyNode.MsgPlaceholderInitialNodepublic String getTagString()
SoyNode.CommandNodegetTagString in interface SoyNode.CommandNodegetTagString in class AbstractCommandNodepublic String toSourceString()
NodetoSourceString in interface NodetoSourceString in class AbstractParentCommandNode<CallParamNode>public List<ExprUnion> getAllExprUnions()
SoyNode.ExprHolderNodegetAllExprUnions in interface SoyNode.ExprHolderNodepublic String genBasePhName()
SoyNode.MsgPlaceholderInitialNodegenBasePhName in interface SoyNode.MsgPlaceholderInitialNodepublic Object genSamenessKey()
SoyNode.MsgPlaceholderInitialNodegenSamenessKey in interface SoyNode.MsgPlaceholderInitialNodepublic SoyNode.BlockNode getParent()
NodegetParent in interface NodegetParent in interface SoyNodegetParent in interface SoyNode.StandaloneNodegetParent in class AbstractSoyNodepublic Collection<TemplateParam> getParamsToRuntimeCheck(TemplateNode callee)
params of the callee that require runtime
type checking when this node is being rendered.public void setEscapingDirectiveNames(com.google.common.collect.ImmutableList<String> escapingDirectiveNames)
public com.google.common.collect.ImmutableList<String> getEscapingDirectiveNames()