KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > presentation > rmi > StubFactoryStaticImpl


1 /*
2  * @(#)StubFactoryStaticImpl.java 1.4 04/04/12
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.presentation.rmi;
9
10 import java.lang.reflect.InvocationHandler JavaDoc ;
11
12 import com.sun.corba.se.spi.presentation.rmi.PresentationManager;
13
14 public class StubFactoryStaticImpl extends StubFactoryBase
15 {
16     private Class JavaDoc stubClass ;
17
18     public StubFactoryStaticImpl(Class JavaDoc cls)
19     {
20     super( null ) ;
21     this.stubClass = cls;
22     }
23     
24     public org.omg.CORBA.Object JavaDoc makeStub()
25     {
26     org.omg.CORBA.Object JavaDoc stub = null;
27     try {
28         stub = (org.omg.CORBA.Object JavaDoc) stubClass.newInstance();
29     } catch (InstantiationException JavaDoc e) {
30         throw new RuntimeException JavaDoc(e);
31     } catch (IllegalAccessException JavaDoc e) {
32         throw new RuntimeException JavaDoc(e);
33     }
34     return stub ;
35     }
36 }
37
Popular Tags