01: /*
02: * Created on 4 Sep 2007
03: */
04: package uk.org.ponder.springutil;
05:
06: import org.springframework.beans.factory.FactoryBean;
07:
08: import uk.org.ponder.booleanutil.BooleanGetter;
09: import uk.org.ponder.booleanutil.BooleanHolder;
10:
11: public class BooleanGetterFactory implements FactoryBean {
12:
13: private Boolean value;
14:
15: public void setValue(Boolean value) {
16: this .value = value;
17: }
18:
19: public Object getObject() throws Exception {
20: return new BooleanHolder(value.booleanValue());
21: }
22:
23: public Class getObjectType() {
24: return BooleanGetter.class;
25: }
26:
27: public boolean isSingleton() {
28: return true;
29: }
30:
31: }
|