Annotation Interface ELFunctions


@Documented @Retention(RUNTIME) @Target({}) public @interface ELFunctions
Maps the public static methods of a class, and the public instance methods it declares, to Jakarta Expression Language functions.

A static method is invoked directly. An instance method is invoked on the instance the jakarta.el.ELContext provides at evaluation time: the one registered under the type with putContext, or the one an io.micronaut.el.ELBeanProvider registered in the context returns, which is how the functions declared on a Micronaut bean reach the bean.

Functions are resolved and bound at compilation time, which replaces the jakarta.el.FunctionMapper lookup performed by an interpreting implementation.

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

    • value

      Class<?> value
      Returns:
      The class declaring the methods to expose as functions
      Default:
      void.class
    • type

      @AliasFor(member="value") Class<?> type
      Returns:
      The class declaring the methods to expose as functions, an alias of value()
      Default:
      void.class
    • prefix

      String prefix
      Returns:
      The namespace prefix of the functions, empty for functions without a namespace; a method sets its own with ELFunction.prefix()
      Default:
      ""