public class ConfigurationItemProducer extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
ConfigurationItem
marked by ConfigurableValue
into bean instances, e.g. checking for marker interfaces or wrapping them with proxies.
By default ConfigurationItemImpl
is provided as configuration item.resolveKey(Field)
,
createConfigurationItem(Class, String, ConfigurationService)
Constructor and Description |
---|
ConfigurationItemProducer() |
Modifier and Type | Method and Description |
---|---|
protected <T extends Serializable> |
createConfigurationItem(Class<T> clazz,
String effectiveKey,
ConfigurationService service)
Creates
ConfigurationItem based upon provided parameters. |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
protected String |
resolveKey(Field field)
Resolves effective key of configuration item from
ConfigurableValue annotation. |
protected <T extends Serializable> ConfigurationItem<T> createConfigurationItem(Class<T> clazz, String effectiveKey, ConfigurationService service)
ConfigurationItem
based upon provided parameters.clazz
- as type of parametereffectiveKey
- as item IDservice
- as contract to process itemsConfigurationItem
implementationprotected String resolveKey(Field field)
ConfigurableValue
annotation.
It ConfigurableValue.key()
is not provided, effective parameter name is build
from the name of class of field and field name.field
- that is marked with ConfigurableValue
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.