1
2
3
4
5
6
7
8
9
10 package org.mule.config.spring.processors;
11
12 import org.mule.api.MuleContext;
13 import org.mule.api.context.MuleContextAware;
14 import org.mule.config.transformer.AnnotatedTransformerObjectProcessor;
15
16 import org.springframework.beans.BeansException;
17 import org.springframework.beans.factory.config.BeanPostProcessor;
18
19
20
21
22 public class TransformerAnnotatedBeanProcessor implements BeanPostProcessor, MuleContextAware
23 {
24 private AnnotatedTransformerObjectProcessor processor;
25
26 public void setMuleContext(MuleContext muleContext)
27 {
28 processor = new AnnotatedTransformerObjectProcessor(muleContext);
29 }
30
31 public Object postProcessBeforeInitialization(Object o, String s) throws BeansException
32 {
33 return processor.process(o);
34 }
35
36
37 public Object postProcessAfterInitialization(Object o, String s) throws BeansException
38 {
39 return o;
40 }
41 }