KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mark > AddDataHelper


1 package mark;
2
3
4 /**
5 * mark/AddDataHelper.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.1"
7 * from W:/Geronimo/corba_container/tests/corba_idl/idl/Add.idl
8 * Monday, December 20, 2004 4:06:00 PM EST
9 */

10
11 abstract public class AddDataHelper
12 {
13   private static String _id = "RMI:mark.AddData:4165959D0B2418DD:88DF93646A6BEE62";
14
15
16   public static void insert (org.omg.CORBA.Any a, mark.AddData that)
17   {
18     org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
19     a.type (type ());
20     write (out, that);
21     a.read_value (out.create_input_stream (), type ());
22   }
23
24   public static mark.AddData extract (org.omg.CORBA.Any a)
25   {
26     return read (a.create_input_stream ());
27   }
28
29   private static org.omg.CORBA.TypeCode __typeCode = null;
30   private static boolean __active = false;
31   synchronized public static org.omg.CORBA.TypeCode type ()
32   {
33     if (__typeCode == null)
34     {
35       synchronized (org.omg.CORBA.TypeCode.class)
36       {
37         if (__typeCode == null)
38         {
39           if (__active)
40           {
41             return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
42           }
43           __active = true;
44           org.omg.CORBA.ValueMember[] _members0 = new org.omg.CORBA.ValueMember[1];
45           org.omg.CORBA.TypeCode _tcOf_members0 = null;
46           // ValueMember instance for J_a
47
_tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
48           _members0[0] = new org.omg.CORBA.ValueMember ("J_a",
49               "",
50               _id,
51               "",
52               _tcOf_members0,
53               null,
54               org.omg.CORBA.PRIVATE_MEMBER.value);
55           __typeCode = org.omg.CORBA.ORB.init ().create_value_tc (_id, "AddData", org.omg.CORBA.VM_NONE.value, null, _members0);
56           __active = false;
57         }
58       }
59     }
60     return __typeCode;
61   }
62
63   public static String id ()
64   {
65     return _id;
66   }
67
68   public static mark.AddData read (org.omg.CORBA.portable.InputStream istream)
69   {
70     return (mark.AddData)((org.omg.CORBA_2_3.portable.InputStream) istream).read_value (id ());
71   }
72
73   public static void write (org.omg.CORBA.portable.OutputStream ostream, mark.AddData value)
74   {
75     ((org.omg.CORBA_2_3.portable.OutputStream) ostream).write_value (value, id ());
76   }
77
78
79   public static mark.AddData createAD (org.omg.CORBA.ORB $orb, int a)
80   {
81     try {
82       mark.AddDataValueFactory $factory = (mark.AddDataValueFactory)
83           ((org.omg.CORBA_2_3.ORB) $orb).lookup_value_factory(id());
84       return $factory.createAD (a);
85     } catch (ClassCastException $ex) {
86       throw new org.omg.CORBA.BAD_PARAM ();
87     }
88   }
89
90 }
91
Popular Tags