KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.CORBA;
2
3
4 /**
5 * org/omg/CORBA/PolicyErrorCodeHelper.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/PortableInterceptor/CORBAX.idl
8 * Saturday, February 9, 2008 9:40:06 AM GMT
9 */

10
11
12 /**
13    * Encapsulates a reason a Policy may be invalid.
14    *
15    * @see PolicyError
16    */

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