Type - the type of beans to post-processpublic class BeansOfTypeConsumer<Type> extends java.lang.Object implements BeanPostProcessor
BeanPostProcessor to consume all beans of a certain type (and all its subtypes).
A common use-case is to collect all beans implementing a certain interface and inject them lazily into another bean.
| Constructor and Description |
|---|
BeansOfTypeConsumer(java.lang.Class<Type> type,
java8.util.function.Consumer<Type> consumer) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
postProcessBean(java.lang.String name,
T bean)
Allows to post-process beans of a
BeanRegistry. |
public <T> T postProcessBean(java.lang.String name,
T bean)
BeanPostProcessorBeanRegistry.
The bean can be changed or even replaced, but must have the same type.
postProcessBean in interface BeanPostProcessorT - the type of the beanname - the bean namebean - the bean to post-process