Package org.codehaus.groovy.ast.expr
Class ConstantExpression
- java.lang.Object
- 
- org.codehaus.groovy.ast.ASTNode
- 
- org.codehaus.groovy.ast.AnnotatedNode
- 
- org.codehaus.groovy.ast.expr.Expression
- 
- org.codehaus.groovy.ast.expr.ConstantExpression
 
 
 
 
- 
- All Implemented Interfaces:
- GroovydocHolder<AnnotatedNode>,- NodeMetaDataHandler
 - Direct Known Subclasses:
- AnnotationConstantExpression
 
 public class ConstantExpression extends Expression Represents a constant expression such as null, true, false.
- 
- 
Field SummaryFields Modifier and Type Field Description static ConstantExpressionEMPTY_EXPRESSIONstatic ConstantExpressionEMPTY_STRINGstatic ConstantExpressionFALSEstatic ConstantExpressionNULLstatic ConstantExpressionPRIM_FALSEstatic ConstantExpressionPRIM_TRUEstatic ConstantExpressionTRUEstatic ConstantExpressionVOID- 
Fields inherited from class org.codehaus.groovy.ast.expr.ExpressionEMPTY_ARRAY
 - 
Fields inherited from interface groovy.lang.groovydoc.GroovydocHolderDOC_COMMENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description ConstantExpression(Object value)ConstantExpression(Object value, boolean keepPrimitive)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConstantName()StringgetText()ObjectgetValue()booleanisEmptyStringExpression()booleanisFalseExpression()booleanisNullExpression()booleanisTrueExpression()voidsetConstantName(String constantName)StringtoString()ExpressiontransformExpression(ExpressionTransformer transformer)Return a copy of the expression calling the transformer on any nested expressionsvoidvisit(GroovyCodeVisitor visitor)- 
Methods inherited from class org.codehaus.groovy.ast.expr.ExpressiongetType, setType, transformExpressions, transformExpressions
 - 
Methods inherited from class org.codehaus.groovy.ast.AnnotatedNodeaddAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
 - 
Methods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
 
- 
 
- 
- 
- 
Field Detail- 
NULLpublic static final ConstantExpression NULL 
 - 
TRUEpublic static final ConstantExpression TRUE 
 - 
FALSEpublic static final ConstantExpression FALSE 
 - 
EMPTY_STRINGpublic static final ConstantExpression EMPTY_STRING 
 - 
PRIM_TRUEpublic static final ConstantExpression PRIM_TRUE 
 - 
PRIM_FALSEpublic static final ConstantExpression PRIM_FALSE 
 - 
VOIDpublic static final ConstantExpression VOID 
 - 
EMPTY_EXPRESSIONpublic static final ConstantExpression EMPTY_EXPRESSION 
 
- 
 - 
Method Detail- 
visitpublic void visit(GroovyCodeVisitor visitor) 
 - 
transformExpressionpublic Expression transformExpression(ExpressionTransformer transformer) Description copied from class:ExpressionReturn a copy of the expression calling the transformer on any nested expressions- Specified by:
- transformExpressionin class- Expression
 
 - 
getValuepublic Object getValue() - Returns:
- the value of this constant expression
 
 - 
getConstantNamepublic String getConstantName() 
 - 
setConstantNamepublic void setConstantName(String constantName) 
 - 
isNullExpressionpublic boolean isNullExpression() 
 - 
isTrueExpressionpublic boolean isTrueExpression() 
 - 
isFalseExpressionpublic boolean isFalseExpression() 
 - 
isEmptyStringExpressionpublic boolean isEmptyStringExpression() 
 
- 
 
-