IBean bean = getBean(autowiredAnnotationBeanPostProcessorName);
BeanDefinition beanDef = BeansModelUtils.getMergedBeanDefinition(bean, context);
if (beanDef.getPropertyValues().size() > 0) {
BeanWrapperImpl wrapper = new BeanWrapperImpl(true);
wrapper.setConversionService(new DefaultConversionService());
wrapper.setWrappedInstance(provider);
for (PropertyValue pv : beanDef.getPropertyValues().getPropertyValueList()) {
if (wrapper.isWritableProperty(pv.getName())) {
// TODO other values types required as well?
if (pv.getValue() instanceof TypedStringValue) {
wrapper.setPropertyValue(pv.getName(), (((TypedStringValue) pv.getValue())).getValue());
}
}
}
}
provider.setProblemReporter(problemReporter);
providers.add(provider);
}
String[] commonAnnotationBeanPostProcessorNames = getBeansForType(CommonAnnotationBeanPostProcessor.class.getName());
for (String commonAnnotationBeanPostProcessorName : commonAnnotationBeanPostProcessorNames) {
CommonAnnnotationInjectionMetadataProvider provider = new CommonAnnnotationInjectionMetadataProvider();
IBean bean = getBean(commonAnnotationBeanPostProcessorName);
BeanDefinition beanDef = BeansModelUtils.getMergedBeanDefinition(bean, context);
if (beanDef.getPropertyValues().size() > 0) {
BeanWrapperImpl wrapper = new BeanWrapperImpl(true);
wrapper.setConversionService(new DefaultConversionService());
wrapper.setWrappedInstance(provider);
for (PropertyValue pv : beanDef.getPropertyValues().getPropertyValueList()) {
if (wrapper.isWritableProperty(pv.getName())) {
// TODO other values types required as well?
if (pv.getValue() instanceof TypedStringValue) {