01: /*
02: * Created on 13 Nov 2006
03: */
04: package uk.org.ponder.rsac;
05:
06: import java.util.ArrayList;
07: import java.util.List;
08:
09: import org.springframework.beans.factory.config.BeanDefinition;
10: import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
11: import org.springframework.beans.factory.support.AbstractBeanDefinition;
12:
13: import uk.org.ponder.saxalizer.MethodAnalyser;
14: import uk.org.ponder.saxalizer.SAXalizerMappingContext;
15:
16: public class RBIBeanDefConverter implements BeanDefConverter {
17: public List rbilist = new ArrayList();
18: private ConfigurableListableBeanFactory clbf;
19: private MethodAnalyser abdanalyser;
20:
21: public RBIBeanDefConverter(ConfigurableListableBeanFactory clbf,
22: SAXalizerMappingContext smc) {
23: this .clbf = clbf;
24: this .abdanalyser = smc
25: .getAnalyser(AbstractBeanDefinition.class);
26: }
27:
28: public void convertBeanDef(BeanDefinition origdef, String beanname,
29: boolean inner) {
30: RSACBeanInfo rbi = BeanDefUtil.convertBeanDef(origdef,
31: beanname, clbf, abdanalyser, this );
32: rbi.beanname = beanname;
33: if (inner) {
34: // Follow Spring "spec" which says that inners are ALWAYS non-singletons.
35: // This is in fact not reflected in its BeanDefinitions.
36: rbi.issingleton = false;
37: }
38: rbilist.add(rbi);
39: }
40:
41: }
|