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