01: package tableappclient.spec;
02:
03: /**
04: * <p>Title: </p>
05: * <p>Description: </p>
06: * <p>Copyright: Copyright (c) 2005</p>
07: * <p>Company: </p>
08: * @author not attributable
09: * @version 1.0
10: */
11:
12: public class AccessDataFactory {
13: private AccessDataFactory() {
14: };
15:
16: public static AccessData createAccessData(String fullClassName,
17: String hostName, String portNum) {
18: AccessData result = null;
19: Class objectClass = null;
20: try {
21: // Create the value object
22: Class[] temp = { Class.forName("java.lang.String"),
23: Class.forName("java.lang.String") };
24: objectClass = Class.forName(fullClassName);
25: result = (AccessData) objectClass.getConstructor(temp)
26: .newInstance(
27: new Object[] { new String(hostName),
28: new String(portNum) });
29: } catch (Exception ex) {
30: System.err.println("Error on creating the object" + ex);
31: }
32: return result;
33: }
34:
35: }
|