View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
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   * TODO
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  }