KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > simpleapp > spec > SimpleListOfDiscsFactory


1 /*
2  * simpleApp
3  *
4  * Enhydra super-servlet specification object
5  *
6  */

7 package simpleapp.spec;
8
9 public class SimpleListOfDiscsFactory {
10     
11     private SimpleListOfDiscsFactory() {
12     }
13
14     public static SimpleListOfDiscs createSimpleListOfDiscs(String JavaDoc fullClassName) {
15         SimpleListOfDiscs result = null;
16         Class JavaDoc objectClass = null;
17
18         try {
19             // Create the value object
20
objectClass = Class.forName(fullClassName);
21             result = (SimpleListOfDiscs) objectClass.newInstance();
22         } catch (Exception JavaDoc ex) {
23             System.out.println("Error on creating the object" + ex);
24         }
25
26         return result;
27     }
28 }
29
Popular Tags