Annotation Interface PreDestroy


@Retention(RUNTIME) @Target(METHOD) public @interface PreDestroy
Marks a zero-arg method to be invoked by Context.close() when the owning Context is closed. Methods are invoked in reverse topological order: dependents are destroyed before their dependencies.

Only methods on instantiated Singleton-scoped objects are invoked; objects that were never created during the lifetime of the context are silently skipped.

Since:
Apr-2026
Author:
reed.vonredwitz
See Also: