001    package org.omg.CosNaming.NamingContextPackage;
002    
003    
004    /**
005    * org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.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         * Indicates that the Naming Context contains bindings.
014         */
015    abstract public class NotEmptyHelper
016    {
017      private static String  _id = "IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0";
018    
019      public static void insert (org.omg.CORBA.Any a, org.omg.CosNaming.NamingContextPackage.NotEmpty that)
020      {
021        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
022        a.type (type ());
023        write (out, that);
024        a.read_value (out.create_input_stream (), type ());
025      }
026    
027      public static org.omg.CosNaming.NamingContextPackage.NotEmpty extract (org.omg.CORBA.Any a)
028      {
029        return read (a.create_input_stream ());
030      }
031    
032      private static org.omg.CORBA.TypeCode __typeCode = null;
033      private static boolean __active = false;
034      synchronized public static org.omg.CORBA.TypeCode type ()
035      {
036        if (__typeCode == null)
037        {
038          synchronized (org.omg.CORBA.TypeCode.class)
039          {
040            if (__typeCode == null)
041            {
042              if (__active)
043              {
044                return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
045              }
046              __active = true;
047              org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0];
048              org.omg.CORBA.TypeCode _tcOf_members0 = null;
049              __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.id (), "NotEmpty", _members0);
050              __active = false;
051            }
052          }
053        }
054        return __typeCode;
055      }
056    
057      public static String id ()
058      {
059        return _id;
060      }
061    
062      public static org.omg.CosNaming.NamingContextPackage.NotEmpty read (org.omg.CORBA.portable.InputStream istream)
063      {
064        org.omg.CosNaming.NamingContextPackage.NotEmpty value = new org.omg.CosNaming.NamingContextPackage.NotEmpty ();
065        // read and discard the repository ID
066        istream.read_string ();
067        return value;
068      }
069    
070      public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CosNaming.NamingContextPackage.NotEmpty value)
071      {
072        // write the repository ID
073        ostream.write_string (id ());
074      }
075    
076    }