Annotation Interface ELMethodExpression
@Documented
@Retention(RUNTIME)
@Target({TYPE,ANNOTATION_TYPE,FIELD,METHOD,PARAMETER})
@Repeatable(ELMethodExpressions.class)
public @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:
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
-
expression
-
expectedReturnType
Class<?> expectedReturnTypeWhen it is not declared, the compiler infers it from the static type of the invocation, the same wayELExpression.expectedTypeis inferred.- Returns:
- The expected return type the result of the invocation is coerced to
- Default:
java.lang.Object.class
-
expectedParamTypes
Class<?>[] expectedParamTypesThe 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.classrather thanint.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:
""
-