Annotation Interface ELMethodExpression


Declares a Jakarta Expression Language method expression to be compiled at compilation time.

A jakarta.el.MethodExpression implementation is generated for the expression. As required by the specification a method expression consists of a single eval-expression.

Since:
1.0
Author:
Denis Stepanov
See Also:
  • Element Details

    • value

      String value
      Returns:
      The expression
      Default:
      ""
    • expression

      @AliasFor(member="value") String expression
      Returns:
      The expression, an alias of value()
      Default:
      ""
    • expectedReturnType

      Class<?> expectedReturnType
      When it is not declared, the compiler infers it from the static type of the invocation, the same way ELExpression.expectedType is inferred.
      Returns:
      The expected return type the result of the invocation is coerced to
      Default:
      java.lang.Object.class
    • expectedParamTypes

      Class<?>[] expectedParamTypes
      The expected parameter types of the invoked method.

      A primitive class literal is kept by the Java compiler only. The neutral annotation metadata cannot represent one, and the Groovy and the Kotlin processors have no way to recover it, so name the wrapper type there: Integer.class rather than int.class.

      Returns:
      The expected parameter types of the invoked method
      Default:
      {}
    • name

      String name
      Returns:
      The name of the generated constant, derived from the expression when not specified
      Default:
      ""