1. /*
  2. * @(#)PolicyTypeHelper.java 1.8 03/01/23
  3. *
  4. * Copyright 2003 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>PolicyType</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/PolicyTypeHelper.java
  13. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  14. * from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl
  15. * Saturday, July 17, 1999 12:26:20 AM PDT
  16. */
  17. // basic Policy definition
  18. abstract public class PolicyTypeHelper
  19. {
  20. private static String _id = "IDL:omg.org/CORBA/PolicyType:1.0";
  21. public static void insert (org.omg.CORBA.Any a, int 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 int 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_ulong);
  38. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.PolicyTypeHelper.id (), "PolicyType", __typeCode);
  39. }
  40. return __typeCode;
  41. }
  42. public static String id ()
  43. {
  44. return _id;
  45. }
  46. public static int read (org.omg.CORBA.portable.InputStream istream)
  47. {
  48. int value = (int)0;
  49. value = istream.read_ulong ();
  50. return value;
  51. }
  52. public static void write (org.omg.CORBA.portable.OutputStream ostream, int value)
  53. {
  54. ostream.write_ulong (value);
  55. }
  56. }