Interface RuntimeBeanDefinition.DisposalContext
- All Superinterfaces:
RuntimeBeanDefinition.LookupContext
- Enclosing interface:
RuntimeBeanDefinition<T>
public static interface RuntimeBeanDefinition.DisposalContext
extends RuntimeBeanDefinition.LookupContext
The context of a single disposal of a bean built at runtime, passed to the disposer of a definition built
with
RuntimeBeanDefinition.Builder.injectedDisposer(BiConsumer).
It offers the same lookups as the RuntimeBeanDefinition.CreationContext of a creation, resolved fresh for this
disposal: the disposer shares neither the resolution context nor the resolved instances with the creation
of the bean it is disposing of, so a lookup of a dependent object returns an instance of its own, not the
one the factory received for the same type.
What a lookup resolves is destroyed when the disposer returns, unlike a bean resolved during creation, which is destroyed with the created bean. A bean whose lifetime the context manages, a singleton for example, is of course not destroyed by the disposal.
- Since:
- 5.2.0
- Author:
- graemerocher
-
Method Summary
Methods inherited from interface RuntimeBeanDefinition.LookupContext
findBean, findBean, getBean, getBean, getBeanContext, getBeansOfType, getBeansOfType