public final class CallDelegateNode extends CallNode
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Class and Description |
|---|---|
static class |
CallDelegateNode.Builder |
| Modifier and Type | Field and Description |
|---|---|
static SoyError |
INVALID_DELEGATE_NAME |
FALLBACK_BASE_PLACEHOLDER_NAMESPACES| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsEmptyDefault()
Returns whether this delegate call defaults to empty string if there's no active impl.
|
CallDelegateNode |
clone()
Copies this node.
|
List<ExprUnion> |
getAllExprUnions()
Returns the list of expressions in this node.
|
String |
getDelCalleeName()
Returns the name of the delegate template being called.
|
ExprRootNode<?> |
getDelCalleeVariantExpr()
Returns the variant expression for the delegate being called, or null if it's a string.
|
SoyNode.Kind |
getKind()
Returns this node's kind (corresponding to this node's specific type).
|
Collection<TemplateParam> |
getParamsToRuntimeCheck(TemplateNode callee)
Returns the subset of
params of the callee that require runtime
type checking when this node is being rendered. |
void |
maybeSetAllowsEmptyDefault(boolean defaultValueForAllowsEmptyDefault)
Sets allowsEmptyDefault to the given default value if it wasn't already user-specified.
|
void |
setParamsToRuntimeCheck(com.google.common.collect.ImmutableMap<TemplateDelegateNode,com.google.common.collect.ImmutableList<TemplateParam>> paramsToRuntimeCheck)
Sets the template params that require runtime type checking for each possible delegate target.
|
genBasePhName, genSamenessKey, getDataExpr, getEscapingDirectiveNames, getParent, getTagString, getUserSuppliedPhName, isPassingAllData, isPassingData, parseDataAttributeHelper, setEscapingDirectiveNames, toSourceStringaddChild, addChild, addChildren, addChildren, appendSourceStringForChildren, appendTreeStringForChildren, clearChildren, getChild, getChildIndex, getChildren, numChildren, removeChild, removeChild, replaceChild, replaceChild, toTreeStringbuildTagStringHelper, buildTagStringHelper, getCommandName, getCommandTextgetId, 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 SoyError INVALID_DELEGATE_NAME
public SoyNode.Kind getKind()
SoyNodepublic String getDelCalleeName()
@Nullable public ExprRootNode<?> getDelCalleeVariantExpr()
public void maybeSetAllowsEmptyDefault(boolean defaultValueForAllowsEmptyDefault)
public void setParamsToRuntimeCheck(com.google.common.collect.ImmutableMap<TemplateDelegateNode,com.google.common.collect.ImmutableList<TemplateParam>> paramsToRuntimeCheck)
public Collection<TemplateParam> getParamsToRuntimeCheck(TemplateNode callee)
CallNodeparams of the callee that require runtime
type checking when this node is being rendered.getParamsToRuntimeCheck in class CallNodepublic boolean allowsEmptyDefault()
public List<ExprUnion> getAllExprUnions()
SoyNode.ExprHolderNodegetAllExprUnions in interface SoyNode.ExprHolderNodegetAllExprUnions in class CallNodepublic CallDelegateNode clone()
NodeAll clone() overrides should follow this contract:
{@literal @}Override public T clone() {
return new T(this);
}
NOTE: this means we do not ultimately delegate to Object.clone(), ever.
TODO(lukes): The usecases for a clone method are few and far between. Making the AST nodes immutable (or at least unmodifiable) would be preferable to maintaining our clone() methods.