Interface ELExpressionSource
public interface ELExpressionSource
A source of the expressions compiled at compilation time.
An implementation is generated for every type declaring expressions with
io.micronaut.el.annotation.ELExpression and is registered as a service, so that
CompiledExpressionFactory can return the compiled expression instead of parsing the expression
string.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable jakarta.el.MethodExpressioncreateMethodExpression(String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) default @Nullable jakarta.el.ValueExpressioncreateValueExpression(String expression, Class<?> expectedType) The expression strings this source declares, so thatCompiledExpressionFactorycan index the sources once and consult only the ones declaring the expression it is asked for.
-
Method Details
-
expressions
The expression strings this source declares, so thatCompiledExpressionFactorycan index the sources once and consult only the ones declaring the expression it is asked for.A source returning an empty list is consulted for every expression, which keeps a source generated before this method existed working, at the cost of a lookup per expression.
- Returns:
- The expression strings, value and method expressions alike
-
createValueExpression
-
createMethodExpression
default @Nullable jakarta.el.MethodExpression createMethodExpression(String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) - Parameters:
expression- The expression stringexpectedReturnType- The expected return typeexpectedParamTypes- The expected parameter types- Returns:
- The compiled method expression or
nullwhen this source does not declare it
-