001    package org.omg.CosNaming;
002    
003    
004    /**
005    * org/omg/CosNaming/BindingTypeHelper.java .
006    * Generated by the IDL-to-Java compiler (portable), version "3.2"
007    * from /builddir/build/BUILD/geronimo-specs-1.6/geronimo-spec-corba/src/main/idl/CosNaming.idl
008    * Saturday, September 22, 2012 10:56:38 AM CEST
009    */
010    
011    
012    /**
013       * Specifies whether the given binding is for a object (that is not a
014       * naming context) or for a naming context.
015       */
016    abstract public class BindingTypeHelper
017    {
018      private static String  _id = "IDL:omg.org/CosNaming/BindingType:1.0";
019    
020      public static void insert (org.omg.CORBA.Any a, org.omg.CosNaming.BindingType that)
021      {
022        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
023        a.type (type ());
024        write (out, that);
025        a.read_value (out.create_input_stream (), type ());
026      }
027    
028      public static org.omg.CosNaming.BindingType extract (org.omg.CORBA.Any a)
029      {
030        return read (a.create_input_stream ());
031      }
032    
033      private static org.omg.CORBA.TypeCode __typeCode = null;
034      synchronized public static org.omg.CORBA.TypeCode type ()
035      {
036        if (__typeCode == null)
037        {
038          __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (org.omg.CosNaming.BindingTypeHelper.id (), "BindingType", new String[] { "nobject", "ncontext"} );
039        }
040        return __typeCode;
041      }
042    
043      public static String id ()
044      {
045        return _id;
046      }
047    
048      public static org.omg.CosNaming.BindingType read (org.omg.CORBA.portable.InputStream istream)
049      {
050        return org.omg.CosNaming.BindingType.from_int (istream.read_long ());
051      }
052    
053      public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CosNaming.BindingType value)
054      {
055        ostream.write_long (value.value ());
056      }
057    
058    }