Package ru.vyarus.guice.ext.managed
Class PreDestroyAnnotationProcessor
- java.lang.Object
-
- ru.vyarus.guice.ext.managed.PreDestroyAnnotationProcessor
-
- All Implemented Interfaces:
MethodPostProcessor<jakarta.annotation.PreDestroy>
public class PreDestroyAnnotationProcessor extends java.lang.Object implements MethodPostProcessor<jakarta.annotation.PreDestroy>
Registers bean methods annotated with @PostConstruct inDestroyableManagerto be called on shutdown.- Since:
- 30.06.2014
-
-
Constructor Summary
Constructors Constructor Description PreDestroyAnnotationProcessor(DestroyableManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocess(jakarta.annotation.PreDestroy annotation, java.lang.reflect.Method method, java.lang.Object instance)Called to post process annotated bean method.
-
-
-
Constructor Detail
-
PreDestroyAnnotationProcessor
public PreDestroyAnnotationProcessor(DestroyableManager manager)
-
-
Method Detail
-
process
public void process(jakarta.annotation.PreDestroy annotation, java.lang.reflect.Method method, java.lang.Object instance) throws java.lang.ExceptionDescription copied from interface:MethodPostProcessorCalled to post process annotated bean method. It is safe to avoid explicit exception handling (except special cases required by processor logic).- Specified by:
processin interfaceMethodPostProcessor<jakarta.annotation.PreDestroy>- Parameters:
annotation- annotation instancemethod- annotated methodinstance- bean instance- Throws:
java.lang.Exception- on any unrecoverable error- See Also:
AnnotatedMethodTypeListener
-
-