01: /*
02: * Created on 04-Feb-2006
03: */
04: package uk.org.ponder.rsac;
05:
06: import java.util.HashMap;
07: import java.util.Iterator;
08:
09: import org.springframework.beans.factory.config.ConstructorArgumentValues;
10:
11: class RSACBeanInfo {
12: // The ACTUAL class of the bean to be FIRST constructed. The class of the
13: // resultant bean may differ for a factory bean.
14: Class beanclass;
15: String beanname;
16: boolean isfactorybean = false;
17: boolean issingleton = true;
18: boolean isabstract;
19: String initmethod;
20: String destroymethod;
21: String factorybean;
22: String factorymethod;
23: String[] dependson;
24: String[] aliases;
25: boolean islazyinit;
26: // key is dependent bean name, value is property name.
27: // ultimately we will cache introspection info here.
28: private HashMap localdepends = new HashMap();
29: public ConstructorArgumentValues.ValueHolder[] constructorargvals;
30: // each member is either an app-static RunnableWrapper or a reference to
31: // one which can be fetched
32: public Object[] fetchwrappers;
33:
34: public boolean hasDependencies() {
35: return !localdepends.isEmpty();
36: }
37:
38: public void recordDependency(String propertyname, Object beanref) {
39: localdepends.put(propertyname, beanref);
40: }
41:
42: public Iterator dependencies() {
43: return localdepends.keySet().iterator();
44: }
45:
46: public Object beanref(String propertyname) {
47: return localdepends.get(propertyname);
48: }
49: }
|