Annotation Interface ELFunction
Declares a method as a Jakarta Expression Language function, with its own name and namespace prefix.
An annotated function is found by the expressions of the module it is declared in without any declaration;
the functions of another module are listed with ELFunctions, which also exposes all the public static
methods, and the public instance methods, of a class with no annotated method. Once a method of a class
carries this annotation, only the annotated methods of the class are functions: a bean exposing one operation
does not expose every public method it has.
A static function is invoked directly. An instance function is invoked on the instance the
jakarta.el.ELContext provides at evaluation time, see io.micronaut.el.ELBeanProvider.
@Singleton
public class PricingService {
@ELFunction(prefix = "pricing")
public double quote(Book book, int quantity) { ... }
}
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
-
name
-
prefix
String prefix- Returns:
- The namespace prefix of the function, defaults to the prefix
ELFunctionsgives the class
- Default:
""
-