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 |
postProcessProperties(PropertyValues pvs,
java.lang.Object bean,
java.lang.String beanName)
Post-process the given property values before the factory applies them
to the given bean, without any need for property descriptors.
|
determineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType
private final BeanFactory beanFactory
public ImportAwareBeanPostProcessor(BeanFactory beanFactory)
public PropertyValues postProcessProperties(@Nullable PropertyValues pvs, java.lang.Object bean, java.lang.String beanName)
InstantiationAwareBeanPostProcessor
Implementations should return null
(the default) if they provide a custom
InstantiationAwareBeanPostProcessor.postProcessPropertyValues(org.springframework.beans.PropertyValues, java.beans.PropertyDescriptor[], java.lang.Object, java.lang.String)
implementation, and pvs
otherwise.
In a future version of this interface (with InstantiationAwareBeanPostProcessor.postProcessPropertyValues(org.springframework.beans.PropertyValues, java.beans.PropertyDescriptor[], java.lang.Object, java.lang.String)
removed),
the default implementation will return the given pvs
as-is directly.
postProcessProperties
in interface InstantiationAwareBeanPostProcessor
postProcessProperties
in class InstantiationAwareBeanPostProcessorAdapter
pvs
- the property values that the factory is about to apply (never null
)bean
- the bean instance created, but whose properties have not yet been setbeanName
- the name of the beannull
which proceeds with the existing properties
but specifically continues with a call to InstantiationAwareBeanPostProcessor.postProcessPropertyValues(org.springframework.beans.PropertyValues, java.beans.PropertyDescriptor[], java.lang.Object, java.lang.String)
(requiring initialized PropertyDescriptor
s for the current bean class)InstantiationAwareBeanPostProcessor.postProcessPropertyValues(org.springframework.beans.PropertyValues, java.beans.PropertyDescriptor[], java.lang.Object, java.lang.String)
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()