public class ConstantExpr extends Expr implements ConstantExpression
BooleanLiteralExpression
or
ByteLiteralExpression
. It does not have any children.Constructor and Description |
---|
ConstantExpr()
The noarg constructor is needed for ANTLR support and deserialization.
|
ConstantExpr(antlr.Token token)
The noarg constructor is needed for ANTLR support.
|
Modifier and Type | Method and Description |
---|---|
void |
arrive(NodeVisitor visitor)
Delegates to the argument
visitor . |
java.lang.Object |
getValue()
Returns the value represented by this expression.
|
java.lang.Object |
leave(NodeVisitor visitor,
java.lang.Object[] results)
Delegates to the argument
visitor . |
static ConstantExpr |
newConstant(java.lang.Object value)
Returns an instance of
ConstantExpression . |
clone, getChildren, getJavaClass, getObject, getParent, getTokenType, setObject, setParent, toString, walkNextChild
getColumn, getLine, getTypeInfo, initialize, initialize, initialize, setColumn, setLine, setTypeInfo, treeToString
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChildren, getJavaClass, getObject, getParent, getTokenType, setObject, setParent, walkNextChild
public ConstantExpr()
setChildren
optionally.public ConstantExpr(antlr.Token token)
setChildren
optionally.public static ConstantExpr newConstant(java.lang.Object value)
ConstantExpression
.
This method handles null
as a constant expression.value
- the object wrapped by the constant expressionpublic java.lang.Object getValue()
getValue
in interface ConstantExpression
public void arrive(NodeVisitor visitor)
visitor
.public java.lang.Object leave(NodeVisitor visitor, java.lang.Object[] results)
visitor
.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.