[Java] Class ConstantExpression
- org.codehaus.groovy.ast.expr.ConstantExpression
public class ConstantExpression
extends Expression
Represents a constant expression such as null, true, false.
Field Summary
Constructor Summary
Methods Summary
Inherited Methods Summary
Inherited Methods
Methods inherited from class | Name |
class Expression | getType, setType, transformExpression, transformExpressions, transformExpressions |
class AnnotatedNode | addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic |
class ASTNode | copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit |
Field Detail
public static final ConstantExpression EMPTY_EXPRESSION
Constructor Detail
public ConstantExpression(Object value)
public ConstantExpression(Object value, boolean keepPrimitive)
Method Detail
public String getConstantName()
public String getText()
public Object getValue()
- Returns:
- the value of this constant expression
public boolean isEmptyStringExpression()
public boolean isFalseExpression()
public boolean isNullExpression()
public boolean isTrueExpression()
public void setConstantName(String constantName)
public String toString()