Package io.micronaut.context.processor
Interface ExecutableMethodProcessor<A extends java.lang.annotation.Annotation>
-
- Type Parameters:
A
- The annotation type, which should be a stereotype ofExecutable
- All Superinterfaces:
AnnotationProcessor<A,ExecutableMethod<?,?>>
public interface ExecutableMethodProcessor<A extends java.lang.annotation.Annotation> extends AnnotationProcessor<A,ExecutableMethod<?,?>>
A class capable of processing an
ExecutableMethod
instances.The use case here is framework components that need to react to the presence of an annotation. For example given the following annotation:
@Executable @Retention(RUNTIME) @Target(ElementType.METHOD) public @interface Scheduled { String cron() }
One could write a
ExecutableMethodProcessor
that processed all methods annotated with @Scheduled:public class MyProcessor implements ExecutableMethodProcessor<Scheduled> { }
- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
process(BeanDefinition<?> beanDefinition, ExecutableMethod<?,?> method)
The process method will be called for everyExecutableMethod
that is annotated with the type parameter A.
-
-
-
Method Detail
-
process
void process(BeanDefinition<?> beanDefinition, ExecutableMethod<?,?> method)
The process method will be called for everyExecutableMethod
that is annotated with the type parameter A.- Specified by:
process
in interfaceAnnotationProcessor<A extends java.lang.annotation.Annotation,ExecutableMethod<?,?>>
- Parameters:
beanDefinition
- The bean definition to processmethod
- The executable method
-
-