public final class IntegerNode extends AbstractExprNode
Important: Do not use outside of Soy code (treat as superpackage-private).
ExprNode.ConstantNode, ExprNode.Kind, ExprNode.OperatorNode, ExprNode.ParentExprNode, ExprNode.PrimitiveNodeSPACES| Constructor and Description |
|---|
IntegerNode(int value,
SourceLocation sourceLocation) |
| Modifier and Type | Method and Description |
|---|---|
IntegerNode |
clone()
Copies this node.
|
boolean |
equals(Object other) |
ExprNode.Kind |
getKind()
Gets this node's kind (corresponding to this node's specific type).
|
SoyType |
getType()
Gets the data type of this node.
|
int |
getValue()
Returns the integer value.
|
int |
hashCode() |
String |
toSourceString()
Builds a Soy source string that could be the source for this node.
|
getParent, getSourceLocationcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toString, toTreeStringfinalize, getClass, notify, notifyAll, wait, wait, waitcouldHaveSyntaxVersionAtLeast, getNearestAncestor, getSourceLocation, getSyntaxVersionBound, hasAncestor, maybeSetSyntaxVersionBound, setParent, toTreeStringpublic IntegerNode(int value,
SourceLocation sourceLocation)
value - The integer value.sourceLocation - The node's source location.public ExprNode.Kind getKind()
ExprNodepublic SoyType getType()
ExprNodepublic int getValue()
public String toSourceString()
Nodepublic IntegerNode 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.