Interface InjectedElementResolver
public interface InjectedElementResolver
Resolve the attributes of an injected element such as a
Constructor
or a factory Method.- Since:
- 6.0
- Author:
- Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Tcreate(DefaultListableBeanFactory beanFactory, BeanDefinitionRegistrar.ThrowableFunction<InjectedElementAttributes, T> factory) Create an instance based on the resolvedattributes.default voidinvoke(DefaultListableBeanFactory beanFactory, BeanDefinitionRegistrar.ThrowableConsumer<InjectedElementAttributes> attributes) Invoke the specified consumer with the resolvedattributes.default InjectedElementAttributesresolve(DefaultListableBeanFactory beanFactory) Resolve the attributes using the specified bean factory.resolve(DefaultListableBeanFactory beanFactory, boolean required) Resolve the attributes using the specified bean factory.
-
Method Details
-
resolve
Resolve the attributes using the specified bean factory.- Parameters:
beanFactory- the bean factory to use- Returns:
- the resolved attributes
-
resolve
Resolve the attributes using the specified bean factory.- Parameters:
beanFactory- the bean factory to userequired- whether the injection point is mandatory- Returns:
- the resolved attributes
-
invoke
default void invoke(DefaultListableBeanFactory beanFactory, BeanDefinitionRegistrar.ThrowableConsumer<InjectedElementAttributes> attributes) Invoke the specified consumer with the resolvedattributes.- Parameters:
beanFactory- the bean factory to use to resolve the attributesattributes- a consumer of the resolved attributes
-
create
default <T> T create(DefaultListableBeanFactory beanFactory, BeanDefinitionRegistrar.ThrowableFunction<InjectedElementAttributes, T> factory) Create an instance based on the resolvedattributes.- Type Parameters:
T- the type of the instance- Parameters:
beanFactory- the bean factory to use to resolve the attributesfactory- a factory to create the instance based on the resolved attributes- Returns:
- a new instance
-