private static class ConfigurationClassPostProcessor.ImportAwareBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter
Modifier and Type | Field and Description |
---|---|
private BeanFactory |
beanFactory |
Constructor and Description |
---|
ImportAwareBeanPostProcessor(BeanFactory beanFactory) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
postProcessBeforeInitialization(java.lang.Object bean,
java.lang.String beanName)
Apply this BeanPostProcessor to the given new bean instance before any bean
initialization callbacks (like InitializingBean's
afterPropertiesSet
or a custom init-method). |
PropertyValues |
postProcessPropertyValues(PropertyValues pvs,
java.beans.PropertyDescriptor[] pds,
java.lang.Object bean,
java.lang.String beanName)
Post-process the given property values before the factory applies them
to the given bean.
|
determineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInstantiation, predictBeanType
private final BeanFactory beanFactory
public ImportAwareBeanPostProcessor(BeanFactory beanFactory)
public PropertyValues postProcessPropertyValues(PropertyValues pvs, java.beans.PropertyDescriptor[] pds, java.lang.Object bean, java.lang.String beanName)
InstantiationAwareBeanPostProcessor
Also allows for replacing the property values to apply, typically through creating a new MutablePropertyValues instance based on the original PropertyValues, adding or removing specific values.
The default implementation returns the given pvs
as-is.
postProcessPropertyValues
in interface InstantiationAwareBeanPostProcessor
postProcessPropertyValues
in class InstantiationAwareBeanPostProcessorAdapter
pvs
- the property values that the factory is about to apply (never null
)pds
- the relevant property descriptors for the target bean (with ignored
dependency types - which the factory handles specifically - already filtered out)bean
- the bean instance created, but whose properties have not yet been setbeanName
- the name of the beannull
to skip property populationMutablePropertyValues
public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
BeanPostProcessor
afterPropertiesSet
or a custom init-method). The bean will already be populated with property values.
The returned bean instance may be a wrapper around the original.
The default implementation returns the given bean
as-is.
postProcessBeforeInitialization
in interface BeanPostProcessor
postProcessBeforeInitialization
in class InstantiationAwareBeanPostProcessorAdapter
bean
- the new bean instancebeanName
- the name of the beannull
, no subsequent BeanPostProcessors will be invokedInitializingBean.afterPropertiesSet()