public class MapMergeDirectiveBeanPostProcessor extends Object
It process all instances of MapMergeDirective beans and applies modification stored in those beans to given
objects. If for some reasons (lazyInit) MapMergeDirective is not instanciated then this post processor will
not get triggered which may lead to some nasty bugs.
Forcing this BeanPostProcessor to load all MapMergeDirective instances during its initialization (via
dependency injection or by extracting them form ApplicationContext) will lead to change in order in which beans are
intialized. Especially some beans will be instanciated before other BeanPostProcessors which may highly affect
stability of the system, so its a bad idea.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MapMergeDirectiveBeanPostProcessor.MapAddProcessor |
protected static interface |
MapMergeDirectiveBeanPostProcessor.MapMergeDirectiveProcessor |
| Constructor and Description |
|---|
MapMergeDirectiveBeanPostProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected ApplicationContext |
getApplicationContext() |
protected ConfigurableListableBeanFactory |
getBeanFactory() |
protected Map<Object,Object> |
getMapByDependency(String dependency,
String directiveBeanName) |
protected Map<Object,Object> |
getMapByPropertyDescriptor(Object bean,
String propertyDescriptor,
String directiveBeanName,
String dependency) |
protected Map<Object,Object> |
getMapByReflection(Object bean,
String fieldName,
String directiveBeanName,
String dependency) |
Object |
postProcessAfterInitialization(Object bean,
String arg1) |
Object |
postProcessBeforeInitialization(Object bean,
String arg1) |
protected Map<Object,Object> |
resolveMapBean(MapMergeDirective mmd,
String directiveBeanName,
String dependency) |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setBeanFactory(BeanFactory beanFactory) |
public Object postProcessBeforeInitialization(Object bean, String arg1) throws BeansException
BeansExceptionpublic Object postProcessAfterInitialization(Object bean, String arg1) throws BeansException
BeansExceptionprotected Map<Object,Object> resolveMapBean(MapMergeDirective mmd, String directiveBeanName, String dependency)
protected Map<Object,Object> getMapByDependency(String dependency, String directiveBeanName)
protected Map<Object,Object> getMapByPropertyDescriptor(Object bean, String propertyDescriptor, String directiveBeanName, String dependency)
protected Map<Object,Object> getMapByReflection(Object bean, String fieldName, String directiveBeanName, String dependency)
protected ConfigurableListableBeanFactory getBeanFactory()
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
BeansExceptionprotected ApplicationContext getApplicationContext()
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
BeansExceptionCopyright © 2017 SAP SE. All Rights Reserved.