1. package org.omg.CosNaming;
  2. /**
  3. * org/omg/CosNaming/BindingTypeHelper.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. /**
  9. * Specifies whether the given binding is for a object (that is not a
  10. * naming context) or for a naming context.
  11. */
  12. abstract public class BindingTypeHelper
  13. {
  14. private static String _id = "IDL:omg.org/CosNaming/BindingType:1.0";
  15. public static void insert (org.omg.CORBA.Any a, org.omg.CosNaming.BindingType that)
  16. {
  17. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  18. a.type (type ());
  19. write (out, that);
  20. a.read_value (out.create_input_stream (), type ());
  21. }
  22. public static org.omg.CosNaming.BindingType extract (org.omg.CORBA.Any a)
  23. {
  24. return read (a.create_input_stream ());
  25. }
  26. private static org.omg.CORBA.TypeCode __typeCode = null;
  27. synchronized public static org.omg.CORBA.TypeCode type ()
  28. {
  29. if (__typeCode == null)
  30. {
  31. __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (org.omg.CosNaming.BindingTypeHelper.id (), "BindingType", new String[] { "nobject", "ncontext"} );
  32. }
  33. return __typeCode;
  34. }
  35. public static String id ()
  36. {
  37. return _id;
  38. }
  39. public static org.omg.CosNaming.BindingType read (org.omg.CORBA.portable.InputStream istream)
  40. {
  41. return org.omg.CosNaming.BindingType.from_int (istream.read_long ());
  42. }
  43. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CosNaming.BindingType value)
  44. {
  45. ostream.write_long (value.value ());
  46. }
  47. }