1. /*
  2. * @(#)VisibilityHelper.java 1.4 00/02/02
  3. *
  4. * Copyright 1999, 2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package org.omg.CORBA;
  11. /**
  12. * org/omg/CORBA/VisibilityHelper.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * from ir.idl
  15. * 03 June 1999 11:33:44 o'clock GMT+00:00
  16. */
  17. // orbos 98-01-18: Objects By Value -- begin
  18. abstract public class VisibilityHelper
  19. {
  20. private static String _id = "IDL:omg.org/CORBA/Visibility:1.0";
  21. public static void insert (org.omg.CORBA.Any a, short that)
  22. {
  23. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  24. a.type (type ());
  25. write (out, that);
  26. a.read_value (out.create_input_stream (), type ());
  27. }
  28. public static short extract (org.omg.CORBA.Any a)
  29. {
  30. return read (a.create_input_stream ());
  31. }
  32. private static org.omg.CORBA.TypeCode __typeCode = null;
  33. synchronized public static org.omg.CORBA.TypeCode type ()
  34. {
  35. if (__typeCode == null)
  36. {
  37. __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short);
  38. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.VisibilityHelper.id (), "Visibility", __typeCode);
  39. }
  40. return __typeCode;
  41. }
  42. public static String id ()
  43. {
  44. return _id;
  45. }
  46. public static short read (org.omg.CORBA.portable.InputStream istream)
  47. {
  48. short value = (short)0;
  49. value = istream.read_short ();
  50. return value;
  51. }
  52. public static void write (org.omg.CORBA.portable.OutputStream ostream, short value)
  53. {
  54. ostream.write_short (value);
  55. }
  56. }