private static class ConfigurationClassPostProcessor.EnhancedConfigurationBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter implements PriorityOrdered, BeanFactoryAware
InstantiationAwareBeanPostProcessorAdapter that ensures
ConfigurationClassEnhancer.EnhancedConfiguration beans are injected with the BeanFactory
before the AutowiredAnnotationBeanPostProcessor runs (SPR-10668).| Modifier and Type | Field and Description |
|---|---|
private BeanFactory |
beanFactory |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Modifier | Constructor and Description |
|---|---|
private |
EnhancedConfigurationBeanPostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder()
Get the order value of this object.
|
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.
|
void |
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
determineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, predictBeanTypeprivate BeanFactory beanFactory
private EnhancedConfigurationBeanPostProcessor()
public int getOrder()
OrderedHigher values are interpreted as lower priority. As a consequence,
the object with the lowest value has the highest priority (somewhat
analogous to Servlet load-on-startup values).
Same order values will result in arbitrary sort positions for the affected objects.
getOrder in interface OrderedOrdered.HIGHEST_PRECEDENCE,
Ordered.LOWEST_PRECEDENCEpublic void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAwareInvoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet() or a custom init-method.
setBeanFactory in interface BeanFactoryAwarebeanFactory - owning BeanFactory (never null).
The bean can immediately call methods on the factory.BeanInitializationExceptionpublic PropertyValues postProcessPropertyValues(PropertyValues pvs, java.beans.PropertyDescriptor[] pds, java.lang.Object bean, java.lang.String beanName)
InstantiationAwareBeanPostProcessorAlso 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.
postProcessPropertyValues in interface InstantiationAwareBeanPostProcessorpostProcessPropertyValues in class InstantiationAwareBeanPostProcessorAdapterpvs - 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