public class ConstantExpression extends Expression
Modifier and Type | Field and Description |
---|---|
static ConstantExpression |
EMPTY_EXPRESSION |
static ConstantExpression |
EMPTY_STRING |
static ConstantExpression |
FALSE |
static ConstantExpression |
NULL |
static ConstantExpression |
PRIM_FALSE |
static ConstantExpression |
PRIM_TRUE |
static ConstantExpression |
TRUE |
static ConstantExpression |
VOID |
Constructor and Description |
---|
ConstantExpression(Object value) |
ConstantExpression(Object value,
boolean keepPrimitive) |
Modifier and Type | Method and Description |
---|---|
String |
getConstantName() |
String |
getText() |
Object |
getValue() |
boolean |
isEmptyStringExpression() |
boolean |
isFalseExpression() |
boolean |
isNullExpression() |
boolean |
isTrueExpression() |
void |
setConstantName(String constantName) |
String |
toString() |
Expression |
transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
|
void |
visit(GroovyCodeVisitor visitor) |
getType, setType, transformExpressions, transformExpressions
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
public static final ConstantExpression NULL
public static final ConstantExpression TRUE
public static final ConstantExpression FALSE
public static final ConstantExpression EMPTY_STRING
public static final ConstantExpression PRIM_TRUE
public static final ConstantExpression PRIM_FALSE
public static final ConstantExpression VOID
public static final ConstantExpression EMPTY_EXPRESSION
public ConstantExpression(Object value)
public ConstantExpression(Object value, boolean keepPrimitive)
public void visit(GroovyCodeVisitor visitor)
public Expression transformExpression(ExpressionTransformer transformer)
Expression
transformExpression
in class Expression
public Object getValue()
public String getConstantName()
public void setConstantName(String constantName)
public boolean isNullExpression()
public boolean isTrueExpression()
public boolean isFalseExpression()
public boolean isEmptyStringExpression()