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