1. /*
  2. * @(#)UnknownUserExceptionHelper.java 1.4 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA;
  8. /**
  9. * The Helper for <tt>UnknownUserException</tt>. For more information on
  10. * Helper files, see <a href="doc-files/generatedfiles.html#helper">
  11. * "Generated Files: Helper Files"</a>.<P>
  12. * org/omg/CORBA/UnknownUserExceptionHelper.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * from CORBA.idl
  15. * Thursday, August 24, 2000 5:52:22 PM PDT
  16. */
  17. abstract public class UnknownUserExceptionHelper
  18. {
  19. private static String _id = "IDL:omg.org/CORBA/UnknownUserException:1.0";
  20. public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.UnknownUserException that)
  21. {
  22. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  23. a.type (type ());
  24. write (out, that);
  25. a.read_value (out.create_input_stream (), type ());
  26. }
  27. public static org.omg.CORBA.UnknownUserException extract (org.omg.CORBA.Any a)
  28. {
  29. return read (a.create_input_stream ());
  30. }
  31. private static org.omg.CORBA.TypeCode __typeCode = null;
  32. private static boolean __active = false;
  33. synchronized public static org.omg.CORBA.TypeCode type ()
  34. {
  35. if (__typeCode == null)
  36. {
  37. synchronized (org.omg.CORBA.TypeCode.class)
  38. {
  39. if (__typeCode == null)
  40. {
  41. if (__active)
  42. {
  43. return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  44. }
  45. __active = true;
  46. org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1];
  47. org.omg.CORBA.TypeCode _tcOf_members0 = null;
  48. _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any);
  49. _members0[0] = new org.omg.CORBA.StructMember (
  50. "except",
  51. _tcOf_members0,
  52. null);
  53. __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CORBA.UnknownUserExceptionHelper.id (), "UnknownUserException", _members0);
  54. __active = false;
  55. }
  56. }
  57. }
  58. return __typeCode;
  59. }
  60. public static String id ()
  61. {
  62. return _id;
  63. }
  64. public static org.omg.CORBA.UnknownUserException read (org.omg.CORBA.portable.InputStream istream)
  65. {
  66. org.omg.CORBA.UnknownUserException value = new org.omg.CORBA.UnknownUserException ();
  67. // read and discard the repository ID
  68. istream.read_string ();
  69. value.except = istream.read_any ();
  70. return value;
  71. }
  72. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.UnknownUserException value)
  73. {
  74. // write the repository ID
  75. ostream.write_string (id ());
  76. ostream.write_any (value.except);
  77. }
  78. }