KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfox > ioc > factory > InstanceComponentFactory


1 /* JFox, the OpenSource J2EE Application Server
2  *
3  * Distributable under GNU LGPL license by gun.org
4  * more details please visit http://www.huihoo.org/jfox
5  */

6 package org.jfox.ioc.factory;
7
8 import org.jfox.ioc.Component;
9
10 /**
11  * 实例组件Factory。简单的组件Factory,直接将组件实例返回
12  *
13  * @author <a HREF="mailto:young_yy@hotmail.com">Young Yang</a>
14  */

15
16 public class InstanceComponentFactory extends ConstrComponentFactory {
17     private Component instance;
18
19     public InstanceComponentFactory(Component instance) {
20         super(instance);
21         this.instance = instance;
22     }
23
24     public Component makeComponent() {
25         return instance;
26     }
27
28     public static void main(String JavaDoc[] args) {
29
30     }
31 }
32
33
Popular Tags