1. /*
  2. * @(#)_IDLTypeStub.java 1.6 00/02/02
  3. *
  4. * Copyright 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package org.omg.CORBA;
  11. /**
  12. * org/omg/CORBA/_IDLTypeStub.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * from ir.idl.
  15. * 03 June 1999 11:33:44 o'clock GMT+00:00
  16. */
  17. public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.IDLType
  18. {
  19. /**
  20. * Constructs a default <code>_IDLTypeStub</code> object.
  21. * NOTE: If the default constructor is used, the
  22. * object is useless until the method <code>_set_delegate</code>
  23. * has been called.
  24. */
  25. public _IDLTypeStub ()
  26. {
  27. super ();
  28. }
  29. /**
  30. * Constructs an <code>_IDLTypeStub</code> object initialized
  31. * with the given <code>Delegate</code> object.
  32. *
  33. * @param delegate a Delegate object
  34. */
  35. public _IDLTypeStub (org.omg.CORBA.portable.Delegate delegate)
  36. {
  37. super ();
  38. _set_delegate (delegate);
  39. }
  40. public org.omg.CORBA.TypeCode type ()
  41. {
  42. org.omg.CORBA.portable.InputStream _in = null;
  43. try {
  44. org.omg.CORBA.portable.OutputStream _out = _request ("_get_type", true);
  45. _in = _invoke (_out);
  46. org.omg.CORBA.TypeCode __result = _in.read_TypeCode ();
  47. return __result;
  48. } catch (org.omg.CORBA.portable.ApplicationException _ex) {
  49. _in = _ex.getInputStream ();
  50. String _id = _ex.getId ();
  51. throw new org.omg.CORBA.MARSHAL (_id);
  52. } catch (org.omg.CORBA.portable.RemarshalException _rm) {
  53. return type ();
  54. } finally {
  55. _releaseReply (_in);
  56. }
  57. } // type
  58. // read interface
  59. public org.omg.CORBA.DefinitionKind def_kind ()
  60. {
  61. org.omg.CORBA.portable.InputStream _in = null;
  62. try {
  63. org.omg.CORBA.portable.OutputStream _out = _request ("_get_def_kind", true);
  64. _in = _invoke (_out);
  65. org.omg.CORBA.DefinitionKind __result = org.omg.CORBA.DefinitionKindHelper.read (_in);
  66. return __result;
  67. } catch (org.omg.CORBA.portable.ApplicationException _ex) {
  68. _in = _ex.getInputStream ();
  69. String _id = _ex.getId ();
  70. throw new org.omg.CORBA.MARSHAL (_id);
  71. } catch (org.omg.CORBA.portable.RemarshalException _rm) {
  72. return def_kind ();
  73. } finally {
  74. _releaseReply (_in);
  75. }
  76. } // def_kind
  77. // write interface
  78. public void destroy ()
  79. {
  80. org.omg.CORBA.portable.InputStream _in = null;
  81. try {
  82. org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true);
  83. _in = _invoke (_out);
  84. } catch (org.omg.CORBA.portable.ApplicationException _ex) {
  85. _in = _ex.getInputStream ();
  86. String _id = _ex.getId ();
  87. throw new org.omg.CORBA.MARSHAL (_id);
  88. } catch (org.omg.CORBA.portable.RemarshalException _rm) {
  89. destroy ();
  90. } finally {
  91. _releaseReply (_in);
  92. }
  93. } // destroy
  94. // Type-specific CORBA::Object operations
  95. private static String[] __ids = {
  96. "IDL:omg.org/CORBA/IDLType:2.3",
  97. "IDL:omg.org/CORBA/IRObject:2.3"};
  98. public String[] _ids ()
  99. {
  100. return (String[])__ids.clone ();
  101. }
  102. private void readObject (java.io.ObjectInputStream s)
  103. {
  104. try
  105. {
  106. String str = s.readUTF ();
  107. org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
  108. org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
  109. _set_delegate (delegate);
  110. } catch (java.io.IOException e) {}
  111. }
  112. private void writeObject (java.io.ObjectOutputStream s)
  113. {
  114. try
  115. {
  116. String str = org.omg.CORBA.ORB.init ().object_to_string (this);
  117. s.writeUTF (str);
  118. } catch (java.io.IOException e) {}
  119. }
  120. } // class _IDLTypeStub