01: /*
02: * Created on Nov 30, 2005
03: */
04: package uk.org.ponder.springutil;
05:
06: import org.springframework.beans.factory.FactoryBean;
07:
08: import uk.org.ponder.stringutil.StringList;
09:
10: public class StringListFactory implements FactoryBean {
11: private StringList stringlist;
12: private String delim = ",";
13:
14: public Object getObject() throws Exception {
15: return stringlist;
16: }
17:
18: public Class getObjectType() {
19: return StringList.class;
20: }
21:
22: public boolean isSingleton() {
23: return true;
24: }
25:
26: public void setDelimiter(String delim) {
27: this .delim = delim;
28: }
29:
30: public void setStrings(String strings) {
31: stringlist = StringList.fromString(strings);
32: }
33: }
|