KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > PolicyTypeHelper


1 /*
2  * @(#)PolicyTypeHelper.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package org.omg.CORBA;
8
9
10 /**
11 * The Helper for <tt>PolicyType</tt>. For more information on
12 * Helper files, see <a HREF="doc-files/generatedfiles.html#helper">
13 * "Generated Files: Helper Files"</a>.<P>
14 * org/omg/CORBA/PolicyTypeHelper.java
15 * Generated by the IDL-to-Java compiler (portable), version "3.0"
16 * from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl
17 * Saturday, July 17, 1999 12:26:20 AM PDT
18 */

19
20
21 // basic Policy definition
22
abstract public class PolicyTypeHelper
23 {
24   private static String JavaDoc _id = "IDL:omg.org/CORBA/PolicyType:1.0";
25
26   public static void insert (org.omg.CORBA.Any JavaDoc a, int that)
27   {
28     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
29     a.type (type ());
30     write (out, that);
31     a.read_value (out.create_input_stream (), type ());
32   }
33
34   public static int extract (org.omg.CORBA.Any JavaDoc a)
35   {
36     return read (a.create_input_stream ());
37   }
38
39   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
40   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
41   {
42     if (__typeCode == null)
43     {
44       __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong);
45       __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.PolicyTypeHelper.id (), "PolicyType", __typeCode);
46     }
47     return __typeCode;
48   }
49
50   public static String JavaDoc id ()
51   {
52     return _id;
53   }
54
55   public static int read (org.omg.CORBA.portable.InputStream JavaDoc istream)
56   {
57     int value = (int)0;
58     value = istream.read_ulong ();
59     return value;
60   }
61
62   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, int value)
63   {
64     ostream.write_ulong (value);
65   }
66
67 }
68
Popular Tags