KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > snapper > spec > IndexerBaseSpecFactory


1 /*
2  * snapper
3  *
4  * Enhydra super-servlet specification object
5  *
6  */

7 package org.enhydra.snapper.spec;
8
9 public class IndexerBaseSpecFactory {
10     
11     /**
12      * Constructor can't be used.
13      */

14     private IndexerBaseSpecFactory() {
15     }
16
17     /**
18      * Create a coin as state object/value object/data transfer object
19      */

20     public static IndexerBaseSpec getIndexerBase(String JavaDoc fullClassName) {
21         IndexerBaseSpec result = null;
22         Class JavaDoc objectClass = null;
23
24         try {
25             // Create the value object
26
objectClass = Class.forName(fullClassName);
27             result = (IndexerBaseSpec) objectClass.newInstance();
28         } catch (Exception JavaDoc ex) {
29             System.out.println("Error on creating the object" + ex);
30         }
31
32         return result;
33     }
34 }
35
Popular Tags