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