Interface RuntimeBeanDefinition<T>

Type Parameters:
T - The bean type
All Superinterfaces:
AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, ArgumentCoercible<T>, BeanContextConditional, BeanDefinition<T>, BeanDefinitionReference<T>, BeanInfo<T>, BeanType<T>, InstantiatableBeanDefinition<T>, Named, QualifiedBeanType<T>

public interface RuntimeBeanDefinition<T> extends BeanDefinitionReference<T>, InstantiatableBeanDefinition<T>, BeanContextConditional
Allow the construction for bean definitions programmatically that can be registered via BeanDefinitionRegistry at runtime.

This differs from BeanDefinitionRegistry.registerSingleton(Object) in that beans registered this way can be created lazily or not at all and participate more completely in the life cycle of the BeanContext (for examples event listeners like BeanCreatedEventListener will be fired).

Note that it is generally not recommended to use this approach and build time bean computation is preferred. This type is designed to support a few limited use cases where runtime bean registration is required.

Since:
3.6.0
Author:
graemerocher
See Also: