001 package org.omg.CORBA;
002
003
004 /**
005 * Generated from IDL interface "ConstantDef".
006 *
007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
008 * @version generated at Nov 6, 2011 12:20:22 AM
009 */
010
011 public final class ConstantDefHelper
012 {
013 public static void insert (final org.omg.CORBA.Any any, final org.omg.CORBA.ConstantDef s)
014 {
015 any.insert_Object(s);
016 }
017 public static org.omg.CORBA.ConstantDef 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/CORBA/ConstantDef:1.0", "ConstantDef");
024 }
025 public static String id()
026 {
027 return "IDL:omg.org/CORBA/ConstantDef:1.0";
028 }
029 public static ConstantDef read(final org.omg.CORBA.portable.InputStream in)
030 {
031 return narrow(in.read_Object());
032 }
033 public static void write(final org.omg.CORBA.portable.OutputStream _out, final org.omg.CORBA.ConstantDef s)
034 {
035 _out.write_Object(s);
036 }
037 public static org.omg.CORBA.ConstantDef narrow(final org.omg.CORBA.Object obj)
038 {
039 if (obj == null)
040 {
041 return null;
042 }
043 else if (obj instanceof org.omg.CORBA.ConstantDef)
044 {
045 return (org.omg.CORBA.ConstantDef)obj;
046 }
047 else
048 {
049 throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
050 }
051 }
052 public static org.omg.CORBA.ConstantDef 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.CORBA.ConstantDef)
059 {
060 return (org.omg.CORBA.ConstantDef)obj;
061 }
062 else
063 {
064 throw new org.omg.CORBA.BAD_PARAM("Narrow failed");
065 }
066 }
067 }