1. package org.omg.CosNaming.NamingContextPackage;
  2. /**
  3. * org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
  6. * Monday, February 23, 2004 7:03:07 AM GMT
  7. */
  8. abstract public class CannotProceedHelper
  9. {
  10. private static String _id = "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0";
  11. public static void insert (org.omg.CORBA.Any a, org.omg.CosNaming.NamingContextPackage.CannotProceed 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.CosNaming.NamingContextPackage.CannotProceed 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.CosNaming.NamingContextHelper.type ();
  40. _members0[0] = new org.omg.CORBA.StructMember (
  41. "cxt",
  42. _tcOf_members0,
  43. null);
  44. _tcOf_members0 = org.omg.CosNaming.NameComponentHelper.type ();
  45. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
  46. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CosNaming.NameHelper.id (), "Name", _tcOf_members0);
  47. _members0[1] = new org.omg.CORBA.StructMember (
  48. "rest_of_name",
  49. _tcOf_members0,
  50. null);
  51. __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.id (), "CannotProceed", _members0);
  52. __active = false;
  53. }
  54. }
  55. }
  56. return __typeCode;
  57. }
  58. public static String id ()
  59. {
  60. return _id;
  61. }
  62. public static org.omg.CosNaming.NamingContextPackage.CannotProceed read (org.omg.CORBA.portable.InputStream istream)
  63. {
  64. org.omg.CosNaming.NamingContextPackage.CannotProceed value = new org.omg.CosNaming.NamingContextPackage.CannotProceed ();
  65. // read and discard the repository ID
  66. istream.read_string ();
  67. value.cxt = org.omg.CosNaming.NamingContextHelper.read (istream);
  68. value.rest_of_name = org.omg.CosNaming.NameHelper.read (istream);
  69. return value;
  70. }
  71. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CosNaming.NamingContextPackage.CannotProceed value)
  72. {
  73. // write the repository ID
  74. ostream.write_string (id ());
  75. org.omg.CosNaming.NamingContextHelper.write (ostream, value.cxt);
  76. org.omg.CosNaming.NameHelper.write (ostream, value.rest_of_name);
  77. }
  78. }