001    package org.omg.IOP;
002    
003    
004    /**
005    * org/omg/IOP/IORHelper.java .
006    * Generated by the IDL-to-Java compiler (portable), version "3.2"
007    * from /home/iurt/rpm/BUILD/geronimo-spec-corba/src/main/idl/IOP.idl
008    * Saturday, November 26, 2011 9:53:35 PM UTC
009    */
010    
011    abstract public class IORHelper
012    {
013      private static String  _id = "IDL:omg.org/IOP/IOR:1.0";
014    
015      public static void insert (org.omg.CORBA.Any a, org.omg.IOP.IOR that)
016      {
017        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
018        a.type (type ());
019        write (out, that);
020        a.read_value (out.create_input_stream (), type ());
021      }
022    
023      public static org.omg.IOP.IOR extract (org.omg.CORBA.Any a)
024      {
025        return read (a.create_input_stream ());
026      }
027    
028      private static org.omg.CORBA.TypeCode __typeCode = null;
029      private static boolean __active = false;
030      synchronized public static org.omg.CORBA.TypeCode type ()
031      {
032        if (__typeCode == null)
033        {
034          synchronized (org.omg.CORBA.TypeCode.class)
035          {
036            if (__typeCode == null)
037            {
038              if (__active)
039              {
040                return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
041              }
042              __active = true;
043              org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
044              org.omg.CORBA.TypeCode _tcOf_members0 = null;
045              _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
046              _members0[0] = new org.omg.CORBA.StructMember (
047                "type_id",
048                _tcOf_members0,
049                null);
050              _tcOf_members0 = org.omg.IOP.TaggedProfileHelper.type ();
051              _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
052              _members0[1] = new org.omg.CORBA.StructMember (
053                "profiles",
054                _tcOf_members0,
055                null);
056              __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.IOP.IORHelper.id (), "IOR", _members0);
057              __active = false;
058            }
059          }
060        }
061        return __typeCode;
062      }
063    
064      public static String id ()
065      {
066        return _id;
067      }
068    
069      public static org.omg.IOP.IOR read (org.omg.CORBA.portable.InputStream istream)
070      {
071        org.omg.IOP.IOR value = new org.omg.IOP.IOR ();
072        value.type_id = istream.read_string ();
073        int _len0 = istream.read_long ();
074        value.profiles = new org.omg.IOP.TaggedProfile[_len0];
075        for (int _o1 = 0;_o1 < value.profiles.length; ++_o1)
076          value.profiles[_o1] = org.omg.IOP.TaggedProfileHelper.read (istream);
077        return value;
078      }
079    
080      public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.IOP.IOR value)
081      {
082        ostream.write_string (value.type_id);
083        ostream.write_long (value.profiles.length);
084        for (int _i0 = 0;_i0 < value.profiles.length; ++_i0)
085          org.omg.IOP.TaggedProfileHelper.write (ostream, value.profiles[_i0]);
086      }
087    
088    }