Expression (Groovy 5.0.8)

Package: org.codehaus.groovy.ast.expr

## [Java] Class Expression

- org.codehaus.groovy.ast.expr.Expression

-     public abstract class Expression
      extends AnnotatedNode

  Base class for any expression.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static Expression[]` | `EMPTY_ARRAY` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public ClassNode` | `getType()`
    `` | `public void` | `setType(ClassNode type)`
    `` | `public abstract Expression` | `transformExpression(ExpressionTransformer transformer)` Transforms this expression and any nested expressions.
    `` | `protected List<Expression>` | `transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer)` Transforms list of expressions.
    `<T extends Expression>` | `protected List<T>` | `transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer, Class<T> targetType)` Transforms list of expressions and checks that all transformed expressions have the given type.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AnnotatedNode` | `addAnnotation, 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 Expression[] EMPTY_ARRAY

  - ### Method Detail

    - #### public ClassNode getType()

    - #### public void setType(ClassNode type)

    - #### public abstract Expression transformExpression(ExpressionTransformer transformer)

      Transforms this expression and any nested expressions.

    - #### protected List<Expression> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer)

      Transforms list of expressions.

      Returns:
        a new list of transformed expressions

    - #### <T extends Expression> protected List<T> transformExpressions(List<? extends Expression> expressions, ExpressionTransformer transformer, Class<T> targetType)

      Transforms list of expressions and checks that all transformed expressions have the given type.

      Returns:
        a new type-safe list of transformed expressions