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