01: /*
02: * jtaDiscRack
03: *
04: * Enhydra super-servlet specification object
05: *
06: */
07: package jtaDiscRack.spec;
08:
09: public class PersonFactory {
10:
11: /**
12: * Constructor can't be used.
13: */
14: private PersonFactory() {
15: }
16:
17: /**
18: * Create a Person as state object/value object/data transfer object
19: */
20: public static Person getPerson(String fullClassName)
21: throws ClassNotFoundException, InstantiationException,
22: IllegalAccessException {
23: Person result = null;
24: Class objectClass = null;
25: // Create the value object
26: objectClass = Class.forName(fullClassName);
27: result = (Person) objectClass.newInstance();
28: return result;
29: }
30:
31: }
|