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