KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)IdentifierHelper.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>Identifier</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/IdentifierHelper.java
15 * Generated by the IDL-to-Java compiler (portable), version "3.0"
16 * from ir.idl
17 * 03 June 1999 11:33:42 o'clock GMT+00:00
18 */

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