org.codehaus.groovy.ast.expr

## Class Expression

- java.lang.Object
- - org.codehaus.groovy.ast.ASTNode
  - - org.codehaus.groovy.ast.AnnotatedNode
    - - org.codehaus.groovy.ast.expr.Expression

- Direct Known Subclasses:
    ArrayExpression, BinaryExpression, BitwiseNegationExpression, BooleanExpression, BytecodeExpression, CastExpression, ClassExpression, ClosureExpression, ConstantExpression, ConstructorCallExpression, EmptyExpression, FieldExpression, GStringExpression, ListExpression, ListOfExpressionsExpression, MapEntryExpression, MapExpression, MethodCallExpression, MethodPointerExpression, PostfixExpression, PrefixExpression, PropertyExpression, RangeExpression, SpreadExpression, SpreadMapExpression, StaticMethodCallExpression, TemporaryVariableExpression, TernaryExpression, TupleExpression, UnaryMinusExpression, UnaryPlusExpression, VariableExpression

      public abstract class Expression
      extends AnnotatedNode

  Represents a base class for expressions which evaluate as an object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Expression()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClassNode` | `getType()`
    `void` | `setType(ClassNode t)`
    `abstract Expression` | `transformExpression(ExpressionTransformer transformer)` Return a copy of the expression calling the transformer on any nested expressions
    `protected java.util.List<Expression>` | `transformExpressions(java.util.List<? extends Expression> expressions, ExpressionTransformer transformer)` Transforms the list of expressions
    `protected <T extends Expression> java.util.List<T>` | `transformExpressions(java.util.List<? extends Expression> expressions, ExpressionTransformer transformer, java.lang.Class<T> transformedType)` Transforms the list of expressions, and checks that all transformed expressions have the given type.

    - ### Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode

      `addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`

    - ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

      `copyNodeMetaData, equals, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getNodeMetaData, getNodeMetaData, getText, hashCode, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Expression

          public Expression()

  - ### Method Detail

    - #### transformExpression

          public abstract Expression transformExpression(ExpressionTransformer transformer)

      Return a copy of the expression calling the transformer on any nested expressions
      Parameters:
        `transformer` -

    - #### transformExpressions

          protected java.util.List<Expression> transformExpressions(java.util.List<? extends Expression> expressions,
                                                                    ExpressionTransformer transformer)

      Transforms the list of expressions
      Returns:
        a new list of transformed expressions

    - #### transformExpressions

          protected <T extends Expression> java.util.List<T> transformExpressions(java.util.List<? extends Expression> expressions,
                                                                                  ExpressionTransformer transformer,
                                                                                  java.lang.Class<T> transformedType)

      Transforms the list of expressions, and checks that all transformed expressions have the given type.
      Returns:
        a new list of transformed expressions

    - #### getType

          public ClassNode getType()

    - #### setType

          public void setType(ClassNode t)