RBIBeanDefConverter.java :  » Web-Framework » RSF » uk » org » ponder » rsac » Java Open Source

Java Open Source » Web Framework » RSF 
RSF » uk » org » ponder » rsac » RBIBeanDefConverter.java
/*
 * Created on 13 Nov 2006
 */
package uk.org.ponder.rsac;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.AbstractBeanDefinition;

import uk.org.ponder.saxalizer.MethodAnalyser;
import uk.org.ponder.saxalizer.SAXalizerMappingContext;

public class RBIBeanDefConverter implements BeanDefConverter {
  public List rbilist = new ArrayList();
  private ConfigurableListableBeanFactory clbf;
  private MethodAnalyser abdanalyser;

  public RBIBeanDefConverter(ConfigurableListableBeanFactory clbf, 
      SAXalizerMappingContext smc) {
    this.clbf = clbf;
    this.abdanalyser = smc.getAnalyser(AbstractBeanDefinition.class);
  }

  public void convertBeanDef(BeanDefinition origdef, String beanname,
      boolean inner) {
    RSACBeanInfo rbi = BeanDefUtil
        .convertBeanDef(origdef, beanname, clbf, abdanalyser, this);
    rbi.beanname = beanname;
    if (inner) {
      // Follow Spring "spec" which says that inners are ALWAYS non-singletons.
      // This is in fact not reflected in its BeanDefinitions.
      rbi.issingleton = false;
    }
    rbilist.add(rbi);
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.