T
- The bean typepublic interface BeanFactory<T>
An interface for classes that are capable of taking the BeanDefinition
instance and building a concrete
instance.
This interface is generally implemented by a build time tool such as an AST transformation framework that will build
the code necessary to construct a valid bean instance.
BeanDefinitionWriter
Modifier and Type | Method and Description |
---|---|
default T |
build(BeanContext context,
BeanDefinition<T> definition)
Builds a bean instance.
|
T |
build(BeanResolutionContext resolutionContext,
BeanContext context,
BeanDefinition<T> definition)
Builds a bean instance.
|
default T build(BeanContext context, BeanDefinition<T> definition) throws BeanInstantiationException
context
- The contextdefinition
- The definitionBeanInstantiationException
- if the instance could not be instantiatedT build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition) throws BeanInstantiationException
resolutionContext
- The bean resolution contextcontext
- The contextdefinition
- The definitionBeanInstantiationException
- if the instance could not be instantiated