1. package org.omg.IOP;
  2. /**
  3. * org/omg/IOP/IORHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/IOP.idl
  6. * Wednesday, September 15, 2004 10:28:42 AM GMT
  7. */
  8. abstract public class IORHelper
  9. {
  10. private static String _id = "IDL:omg.org/IOP/IOR/IOR:1.0";
  11. public static void insert (org.omg.CORBA.Any a, org.omg.IOP.IOR that)
  12. {
  13. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  14. a.type (type ());
  15. write (out, that);
  16. a.read_value (out.create_input_stream (), type ());
  17. }
  18. public static org.omg.IOP.IOR extract (org.omg.CORBA.Any a)
  19. {
  20. return read (a.create_input_stream ());
  21. }
  22. private static org.omg.CORBA.TypeCode __typeCode = null;
  23. private static boolean __active = false;
  24. synchronized public static org.omg.CORBA.TypeCode type ()
  25. {
  26. if (__typeCode == null)
  27. {
  28. synchronized (org.omg.CORBA.TypeCode.class)
  29. {
  30. if (__typeCode == null)
  31. {
  32. if (__active)
  33. {
  34. return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  35. }
  36. __active = true;
  37. org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
  38. org.omg.CORBA.TypeCode _tcOf_members0 = null;
  39. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
  40. _members0[0] = new org.omg.CORBA.StructMember (
  41. "type_id",
  42. _tcOf_members0,
  43. null);
  44. _tcOf_members0 = org.omg.IOP.TaggedProfileHelper.type ();
  45. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
  46. _members0[1] = new org.omg.CORBA.StructMember (
  47. "profiles",
  48. _tcOf_members0,
  49. null);
  50. __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.IOP.IORHelper.id (), "IOR", _members0);
  51. __active = false;
  52. }
  53. }
  54. }
  55. return __typeCode;
  56. }
  57. public static String id ()
  58. {
  59. return _id;
  60. }
  61. public static org.omg.IOP.IOR read (org.omg.CORBA.portable.InputStream istream)
  62. {
  63. org.omg.IOP.IOR value = new org.omg.IOP.IOR ();
  64. value.type_id = istream.read_string ();
  65. int _len0 = istream.read_long ();
  66. value.profiles = new org.omg.IOP.TaggedProfile[_len0];
  67. for (int _o1 = 0;_o1 < value.profiles.length; ++_o1)
  68. value.profiles[_o1] = org.omg.IOP.TaggedProfileHelper.read (istream);
  69. return value;
  70. }
  71. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.IOP.IOR value)
  72. {
  73. ostream.write_string (value.type_id);
  74. ostream.write_long (value.profiles.length);
  75. for (int _i0 = 0;_i0 < value.profiles.length; ++_i0)
  76. org.omg.IOP.TaggedProfileHelper.write (ostream, value.profiles[_i0]);
  77. }
  78. }