org.codehaus.groovy.ast.expr
Class ConstantExpression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.ast.expr.ConstantExpression
- Direct Known Subclasses:
- AnnotationConstantExpression
public class ConstantExpression
- extends Expression
Represents a constant expression such as null, true, false
- Version:
- $Revision: 12194 $
- Author:
- James Strachan
NULL
public static final ConstantExpression NULL
TRUE
public static final ConstantExpression TRUE
FALSE
public static final ConstantExpression FALSE
EMPTY_STRING
public static final ConstantExpression EMPTY_STRING
VOID
public static final ConstantExpression VOID
EMTPY_EXPRESSION
public static final ConstantExpression EMTPY_EXPRESSION
ConstantExpression
public ConstantExpression(Object value)
toString
public String toString()
- Overrides:
toString
in class Object
visit
public void visit(GroovyCodeVisitor visitor)
- Overrides:
visit
in class ASTNode
transformExpression
public Expression transformExpression(ExpressionTransformer transformer)
- Description copied from class:
Expression
- Return a copy of the expression calling the transformer on any nested expressions
- Specified by:
transformExpression
in class Expression
getValue
public Object getValue()
- Returns:
- the value of this constant expression
getText
public String getText()
- Overrides:
getText
in class ASTNode
getConstantName
public String getConstantName()
setConstantName
public void setConstantName(String constantName)
isNullExpression
public boolean isNullExpression()
isTrueExpression
public boolean isTrueExpression()
isFalseExpression
public boolean isFalseExpression()
isEmptyStringExpression
public boolean isEmptyStringExpression()