KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tableappclient > spec > TableNodeFactory


1 package tableappclient.spec;
2
3 /**
4  * <p>Title: </p>
5  * <p>Description: </p>
6  * <p>Copyright: Copyright (c) 2005</p>
7  * <p>Company: </p>
8  * @author not attributable
9  * @version 1.0
10  */

11
12 public class TableNodeFactory {
13   private TableNodeFactory() {};
14   public static TableNode createTableNode(String JavaDoc
15                                           fullClassName) {
16     TableNode result = null;
17     Class JavaDoc objectClass = null;
18     try {
19 // Create the value object
20
objectClass = Class.forName(fullClassName);
21       result = (TableNode) objectClass.newInstance();
22     }
23     catch (Exception JavaDoc ex) {
24       System.err.println("Error on creating the object" + ex);
25     }
26     return result;
27   }
28
29 }
Popular Tags