Package io.micronaut.inject
Interface BeanFactory<T>
- Type Parameters:
T
- The bean type
- All Known Subinterfaces:
ParametrizedBeanFactory<T>
@Deprecated(since="4")
@NextMajorVersion("Should be removed after Micronaut 4 Milestone 1")
public interface BeanFactory<T>
Deprecated.
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.
- Since:
- 1.0
- Author:
- Graeme Rocher
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
build
(BeanContext context, BeanDefinition<T> definition) Deprecated.Builds a bean instance.build
(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition) Deprecated.Builds a bean instance.
-
Method Details
-
build
default T build(BeanContext context, BeanDefinition<T> definition) throws BeanInstantiationException Deprecated.Builds a bean instance.- Parameters:
context
- The contextdefinition
- The definition- Returns:
- The instance
- Throws:
BeanInstantiationException
- if the instance could not be instantiated
-
build
T build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition) throws BeanInstantiationException Deprecated.Builds a bean instance.- Parameters:
resolutionContext
- The bean resolution contextcontext
- The contextdefinition
- The definition- Returns:
- The instance
- Throws:
BeanInstantiationException
- if the instance could not be instantiated
-