public class BeanLevelPropertyBeanPostProcessor extends Object implements BeanPostProcessor
BeanPostProcessor that process beans that implement
BeanLevelPropertiesAware or BeanLevelMergedPropertiesAware based on the provided
BeanLevelProperties.
In addition, beans that contain a field that has the annotation BeanLevelPropertiesContext
will be injected with the BeanLevelProperties. Beans that contain a field that has the
annotation BeanLevelMergedPropertiesContext will be injected with the merged Properties
based on the provided beanName.BeanLevelProperties,
BeanLevelMergedPropertiesAware,
BeanLevelPropertiesAware| Constructor and Description |
|---|
BeanLevelPropertyBeanPostProcessor(BeanLevelProperties beanLevelProperties)
Constructs a new bean level bean post processor based on the provided bean level properties.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
postProcessAfterInitialization(Object bean,
String beanName)
A no op, just returned the bean itself.
|
Object |
postProcessBeforeInitialization(Object bean,
String beanName)
Post process a given bean.
|
public BeanLevelPropertyBeanPostProcessor(BeanLevelProperties beanLevelProperties)
beanLevelProperties - The bean level properties to be used for injectionpublic Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException
BeanLevelPropertiesAware of if it
contains a field that has the annotation BeanLevelPropertiesContext the provided
BeanLevelProperties will be injected to it. If the bean implements
BeanLevelMergedPropertiesAware of if it contains a field that has the annotation
BeanLevelMergedPropertiesContext then the merged properties based on the provided
beanName will be injected (using BeanLevelProperties.getMergedBeanProperties(String)).postProcessBeforeInitialization in interface BeanPostProcessorbean - The bean to possibly perform injection of BeanLevelPropertiesbeanName - The bean nameBeansExceptionpublic Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException
postProcessAfterInitialization in interface BeanPostProcessorBeansExceptionCopyright © GigaSpaces.