Class 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 in DestroyableManager to be called on shutdown.
    Since:
    30.06.2014
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void process​(jakarta.annotation.PreDestroy annotation, java.lang.reflect.Method method, java.lang.Object instance)
      Called to post process annotated bean method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.Exception
        Description copied from interface: MethodPostProcessor
        Called to post process annotated bean method. It is safe to avoid explicit exception handling (except special cases required by processor logic).
        Specified by:
        process in interface MethodPostProcessor<jakarta.annotation.PreDestroy>
        Parameters:
        annotation - annotation instance
        method - annotated method
        instance - bean instance
        Throws:
        java.lang.Exception - on any unrecoverable error
        See Also:
        AnnotatedMethodTypeListener