Class CompiledLambdaExpression

java.lang.Object
jakarta.el.LambdaExpression
io.micronaut.el.runtime.CompiledLambdaExpression

@Internal public final class CompiledLambdaExpression extends jakarta.el.LambdaExpression
A lambda expression whose body is compiled.

The invocation hands the arguments to the body directly: the body reads its parameters as Java locals, so the lambda scope of the context, a map of the arguments by name pushed for every invocation by LambdaExpression.invoke(ELContext, Object...), is not needed. The nested lambda expressions capture the parameters of the enclosing ones the way Java lambdas do, which is what the scope otherwise provides.

Since:
1.0
Author:
Denis Stepanov
  • Constructor Details

    • CompiledLambdaExpression

      public CompiledLambdaExpression(jakarta.el.ELContext context, String[] parameters, ELLambdaBody body)
      Parameters:
      context - The context the lambda expression is created in
      parameters - The formal parameters
      body - The compiled body
  • Method Details

    • setELContext

      public void setELContext(jakarta.el.ELContext context)
      Overrides:
      setELContext in class jakarta.el.LambdaExpression
    • invoke

      public @Nullable Object invoke(jakarta.el.ELContext elContext, Object... args)
      Overrides:
      invoke in class jakarta.el.LambdaExpression
    • invoke

      public @Nullable Object invoke(Object... args)
      Overrides:
      invoke in class jakarta.el.LambdaExpression