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