Package io.micronaut.function
Annotation Interface FunctionBean
@Documented
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Singleton
@Executable
public @interface FunctionBean
An annotation applied to classes that should be exposed as functions. The class itself must implement an interface
from java.util.function
such as Consumer
to be exposed as a function.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Optional Element Summary
-
Element Details
-
value
@AliasFor(member="name") @AliasFor(annotation=jakarta.inject.Named.class,member="value") String value- Returns:
- An optional ID of the function which may or may not be used depending on the target platform
- Default:
- ""
-
name
@AliasFor(member="value") @AliasFor(annotation=jakarta.inject.Named.class,member="value") String name- Returns:
- An optional ID of the function which may or may not be used depending on the target platform
- Default:
- ""
-
method
String methodThe method name of a function within the class that is the function to invoke. The method should take no more than two arguments- Returns:
- The method name
- Default:
- ""
-