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