1. /*
  2. * @(#)NameValuePairHelper.java 1.9 03/12/19
  3. *
  4. * Copyright 2004 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>NameValuePair</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/NameValuePairHelper.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * 03 June 1999 11:52:03 o'clock GMT+00:00
  15. */
  16. abstract public class NameValuePairHelper
  17. {
  18. private static String _id = "IDL:omg.org/CORBA/NameValuePair:1.0";
  19. public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.NameValuePair that)
  20. {
  21. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  22. a.type (type ());
  23. write (out, that);
  24. a.read_value (out.create_input_stream (), type ());
  25. }
  26. public static org.omg.CORBA.NameValuePair extract (org.omg.CORBA.Any a)
  27. {
  28. return read (a.create_input_stream ());
  29. }
  30. private static org.omg.CORBA.TypeCode __typeCode = null;
  31. private static boolean __active = false;
  32. synchronized public static org.omg.CORBA.TypeCode type ()
  33. {
  34. if (__typeCode == null)
  35. {
  36. synchronized (org.omg.CORBA.TypeCode.class)
  37. {
  38. if (__typeCode == null)
  39. {
  40. if (__active)
  41. {
  42. return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  43. }
  44. __active = true;
  45. org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
  46. org.omg.CORBA.TypeCode _tcOf_members0 = null;
  47. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
  48. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.FieldNameHelper.id (), "FieldName", _tcOf_members0);
  49. _members0[0] = new org.omg.CORBA.StructMember (
  50. "id",
  51. _tcOf_members0,
  52. null);
  53. _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any);
  54. _members0[1] = new org.omg.CORBA.StructMember (
  55. "value",
  56. _tcOf_members0,
  57. null);
  58. __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.CORBA.NameValuePairHelper.id (), "NameValuePair", _members0);
  59. __active = false;
  60. }
  61. }
  62. }
  63. return __typeCode;
  64. }
  65. public static String id ()
  66. {
  67. return _id;
  68. }
  69. public static org.omg.CORBA.NameValuePair read (org.omg.CORBA.portable.InputStream istream)
  70. {
  71. org.omg.CORBA.NameValuePair value = new org.omg.CORBA.NameValuePair ();
  72. value.id = istream.read_string ();
  73. value.value = istream.read_any ();
  74. return value;
  75. }
  76. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.NameValuePair value)
  77. {
  78. ostream.write_string (value.id);
  79. ostream.write_any (value.value);
  80. }
  81. }