Class 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 Details

  • Constructor Details

    • ConstantExpression

      public ConstantExpression​(java.lang.Object value)
    • ConstantExpression

      public ConstantExpression​(java.lang.Object value, boolean keepPrimitive)
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.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 java.lang.Object getValue()
      Returns:
      the value of this constant expression
    • getText

      public java.lang.String getText()
      Overrides:
      getText in class ASTNode
    • getConstantName

      public java.lang.String getConstantName()
    • setConstantName

      public void setConstantName​(java.lang.String constantName)
    • isNullExpression

      public boolean isNullExpression()
    • isTrueExpression

      public boolean isTrueExpression()
    • isFalseExpression

      public boolean isFalseExpression()
    • isEmptyStringExpression

      public boolean isEmptyStringExpression()