Class BeanDefinitionRegistrar.BeanInstanceContext
java.lang.Object
org.springframework.beans.factory.generator.config.BeanDefinitionRegistrar.BeanInstanceContext
- Enclosing class:
- BeanDefinitionRegistrar
Callback interface used by instance suppliers that need to resolve
dependencies for the
Executable
used to create the instance
as well as any Member
that should be handled by the context.-
Method Summary
Modifier and TypeMethodDescription<T> T
create
(DefaultListableBeanFactory beanFactory, BeanDefinitionRegistrar.ThrowableFunction<InjectedElementAttributes, T> factory) Return the bean instance using thefactory
.Create anInjectedElementResolver
for the specified field.Create anInjectedElementResolver
for the specified bean method.
-
Method Details
-
create
public <T> T create(DefaultListableBeanFactory beanFactory, BeanDefinitionRegistrar.ThrowableFunction<InjectedElementAttributes, T> factory) Return the bean instance using thefactory
.- Type Parameters:
T
- the type of the bean- Parameters:
beanFactory
- the bean factory to usefactory
- a function that returns the bean instance based on the resolved attributes required by its instance creator- Returns:
- the bean instance
-
field
Create anInjectedElementResolver
for the specified field.- Parameters:
name
- the name of the field- Returns:
- a resolved for the specified field
-
method
Create anInjectedElementResolver
for the specified bean method.- Parameters:
name
- the name of the method on the target beanparameterTypes
- the method parameter types- Returns:
- a resolved for the specified bean method
-