01: /*
02: *
03: */
04: package org.enhydra.snapperAdmin.spec;
05:
06: public class IndexFactory {
07:
08: /**
09: * Constructor can't be used.
10: */
11: private IndexFactory() {
12: }
13:
14: /**
15: * Create a Site as state object/value object/data transfer object
16: */
17: public static Index getIndex(String fullClassName) throws Exception {
18:
19: Index result = null;
20:
21: Class objectClass = null;
22:
23: try {
24: // Create the value object
25:
26: objectClass = Class.forName(fullClassName);
27:
28: result = (Index) objectClass.newInstance();
29:
30: } catch (Exception ex) {
31: System.out.println("Error on creating the object" + ex);
32: }
33:
34: return result;
35: }
36:
37: }
|