public final class GlobalNode extends AbstractExprNode
Important: Do not use outside of Soy code (treat as superpackage-private).
ExprNode.ConstantNode, ExprNode.Kind, ExprNode.OperatorNode, ExprNode.ParentExprNode, ExprNode.PrimitiveNode| Modifier and Type | Field and Description |
|---|---|
static GlobalNode |
ERROR |
SPACES| Constructor and Description |
|---|
GlobalNode(String name,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
GlobalNode |
copy(CopyState copyState)
See
Node.copy(CopyState) for a description of the copy contract. |
ExprNode.Kind |
getKind()
Gets this node's kind (corresponding to this node's specific type).
|
String |
getName()
Returns the name of the global.
|
SoyType |
getType()
Gets the data type of this node.
|
boolean |
shouldSuppressUnknownGlobalErrors()
Returns true if 'unknown global' errors should not be reported for this node.
|
void |
suppressUnknownGlobalErrors()
Call this method to suppress unknown global errors for this node.
|
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
getParent, getSourceLocationcouldHaveSyntaxVersionAtLeast, equals, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, hashCode, maybeSetSyntaxVersionUpperBound, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionUpperBound, hasAncestor, maybeSetSyntaxVersionUpperBound, setParentpublic static final GlobalNode ERROR
public GlobalNode(String name, SourceLocation sourceLocation)
name - The name of the global.sourceLocation - The node's source location.public ExprNode.Kind getKind()
ExprNodepublic SoyType getType()
ExprNodepublic String getName()
public void suppressUnknownGlobalErrors()
public boolean shouldSuppressUnknownGlobalErrors()
public String toSourceString()
Nodepublic GlobalNode copy(CopyState copyState)
ExprNodeNode.copy(CopyState) for a description of the copy contract.