001    package org.omg.PortableServer;
002    
003    
004    /**
005     * Generated from IDL interface "Current".
006     *
007     * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
008     * @version generated at Jun 18, 2012 10:37:57 AM
009     */
010    
011    public final class CurrentHelper
012    {
013            public static void insert (final org.omg.CORBA.Any any, final org.omg.PortableServer.Current s)
014            {
015                            any.insert_Object(s);
016            }
017            public static org.omg.PortableServer.Current extract(final org.omg.CORBA.Any any)
018            {
019                    return narrow(any.extract_Object()) ;
020            }
021            public static org.omg.CORBA.TypeCode type()
022            {
023                    return org.omg.CORBA.ORB.init().create_interface_tc("IDL:omg.org/PortableServer/Current:1.0", "Current");
024            }
025            public static String id()
026            {
027                    return "IDL:omg.org/PortableServer/Current:1.0";
028            }
029            public static Current read(final org.omg.CORBA.portable.InputStream in)
030            {
031                    throw new org.omg.CORBA.MARSHAL();
032            }
033            public static void write(final org.omg.CORBA.portable.OutputStream _out, final org.omg.PortableServer.Current s)
034            {
035                    throw new org.omg.CORBA.MARSHAL();
036            }
037            public static org.omg.PortableServer.Current narrow(final org.omg.CORBA.Object obj)
038            {
039                    if (obj == null)
040                    {
041                            return null;
042                    }
043                    else if (obj instanceof org.omg.PortableServer.Current)
044                    {
045                            return (org.omg.PortableServer.Current)obj;
046                    }
047                    else
048                    {
049                            throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
050                    }
051            }
052            public static org.omg.PortableServer.Current unchecked_narrow(final org.omg.CORBA.Object obj)
053            {
054                    if (obj == null)
055                    {
056                            return null;
057                    }
058                    else if (obj instanceof org.omg.PortableServer.Current)
059                    {
060                            return (org.omg.PortableServer.Current)obj;
061                    }
062                    else
063                    {
064                            throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
065                    }
066            }
067    }