KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hamletsoft > enhydra > cactus > spec > EnhydraAppImplicitObjectsFactory


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

7 package org.hamletsoft.enhydra.cactus.spec;
8
9
10 public class EnhydraAppImplicitObjectsFactory {
11     
12     /**
13      * Constructor can't be used.
14      */

15     private EnhydraAppImplicitObjectsFactory() {
16     }
17
18     /**
19      * Create a EnhydraAppImplicitObjects as state object/value object/data transfer object
20      */

21     public static EnhydraAppImplicitObjects getEnhydraAppImplicitObjects(String JavaDoc fullClassName) {
22         
23         EnhydraAppImplicitObjects result = null;
24        
25         Class JavaDoc objectClass = null;
26
27         try {
28             // Create the value object
29

30       
31          objectClass = Class.forName(fullClassName);
32                                    
33           result = (EnhydraAppImplicitObjects)objectClass.newInstance();
34                
35                        
36                     
37       } catch (Exception JavaDoc ex) {
38             System.out.println("Error on creating the object" + ex);
39         }
40
41         return result;
42     }
43 }
Popular Tags