01: /*
02: * Created on 2006.6.13
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package org.enhydra.snapperPreviewer.spec;
08:
09: /**
10: * @author lola
11: *
12: * TODO To change the template for this generated type comment go to
13: * Window - Preferences - Java - Code Style - Code Templates
14: */
15: public class WrapperFactory {
16:
17: /**
18: * Constructor can't be used.
19: */
20: private WrapperFactory() {
21: }
22:
23: /**
24: * Create a Manager as state object/value object/data transfer object
25: */
26: public static Wrapper getWrapper(String fullClassName) {
27:
28: Wrapper result = null;
29:
30: Class objectClass = null;
31:
32: try {
33: // Create the value object
34:
35: objectClass = Class.forName(fullClassName);
36:
37: result = (Wrapper) objectClass.newInstance();
38:
39: } catch (Throwable ex) {
40: result = null;
41: }
42:
43: return result;
44: }
45: }
|