Package io.micronaut.inject
Interface ParametrizedBeanFactory<T>
- Type Parameters:
T
- The type
- All Superinterfaces:
BeanFactory<T>
@Deprecated(since="4")
@NextMajorVersion("Should be removed after Micronaut 4 Milestone 1")
public interface ParametrizedBeanFactory<T>
extends BeanFactory<T>
Deprecated.
A
BeanFactory
that requires additional (possibly user supplied) parameters in order construct a bean.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
build
(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition) Deprecated.Builds a bean instance.build
(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition, Map<String, Object> requiredArgumentValues) Deprecated.Variation of theBeanFactory.build(BeanContext, BeanDefinition)
method that allows passing the values necessary for successful bean construction.Argument<?>[]
Deprecated.Methods inherited from interface io.micronaut.inject.BeanFactory
build
-
Method Details
-
getRequiredArguments
Argument<?>[] getRequiredArguments()Deprecated.- Returns:
- The arguments required to construct this bean
-
build
T build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition, Map<String, Object> requiredArgumentValues) throws BeanInstantiationExceptionDeprecated.Variation of theBeanFactory.build(BeanContext, BeanDefinition)
method that allows passing the values necessary for successful bean construction.- Parameters:
resolutionContext
- TheBeanResolutionContext
context
- TheBeanContext
definition
- TheBeanDefinition
requiredArgumentValues
- The required arguments values. The keys should match the names of the arguments returned bygetRequiredArguments()
- Returns:
- The instantiated bean
- Throws:
BeanInstantiationException
- If the bean cannot be instantiated for the arguments supplied
-
build
default T build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<T> definition) throws BeanInstantiationException Deprecated.Description copied from interface:BeanFactory
Builds a bean instance.- Specified by:
build
in interfaceBeanFactory<T>
- Parameters:
resolutionContext
- The bean resolution contextcontext
- The contextdefinition
- The definition- Returns:
- The instance
- Throws:
BeanInstantiationException
- if the instance could not be instantiated
-