1. package org.omg.CosNaming;
  2. /**
  3. * org/omg/CosNaming/BindingType.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. public class BindingType implements org.omg.CORBA.portable.IDLEntity
  13. {
  14. private int __value;
  15. private static int __size = 2;
  16. private static org.omg.CosNaming.BindingType[] __array = new org.omg.CosNaming.BindingType [__size];
  17. public static final int _nobject = 0;
  18. public static final org.omg.CosNaming.BindingType nobject = new org.omg.CosNaming.BindingType(_nobject);
  19. public static final int _ncontext = 1;
  20. public static final org.omg.CosNaming.BindingType ncontext = new org.omg.CosNaming.BindingType(_ncontext);
  21. public int value ()
  22. {
  23. return __value;
  24. }
  25. public static org.omg.CosNaming.BindingType from_int (int value)
  26. {
  27. if (value >= 0 && value < __size)
  28. return __array[value];
  29. else
  30. throw new org.omg.CORBA.BAD_PARAM ();
  31. }
  32. protected BindingType (int value)
  33. {
  34. __value = value;
  35. __array[__value] = this;
  36. }
  37. } // class BindingType