01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest.spring.bean;
05:
06: import org.springframework.beans.factory.FactoryBean;
07:
08: public class SingletonFactoryBean implements FactoryBean {
09:
10: private Object singleton;
11:
12: public Object getObject() throws Exception {
13: return singleton;
14: }
15:
16: public Class getObjectType() {
17: return Singleton.class;
18: }
19:
20: public boolean isSingleton() {
21: return true;
22: }
23:
24: public void setObject(Object singleton) {
25: this.singleton = singleton;
26: }
27:
28: }
|