001 package org.omg.CORBA; 002 003 004 /** 005 * Generated from IDL interface "ConstructionPolicy". 006 * 007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007 008 * @version generated at Sep 22, 2012 10:58:05 AM 009 */ 010 011 public final class ConstructionPolicyHelper 012 { 013 public static void insert (final org.omg.CORBA.Any any, final org.omg.CORBA.ConstructionPolicy s) 014 { 015 any.insert_Object(s); 016 } 017 public static org.omg.CORBA.ConstructionPolicy 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/ConstructionPolicy:1.0", "ConstructionPolicy"); 024 } 025 public static String id() 026 { 027 return "IDL:omg.org/CORBA/ConstructionPolicy:1.0"; 028 } 029 public static ConstructionPolicy 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.ConstructionPolicy s) 034 { 035 _out.write_Object(s); 036 } 037 public static org.omg.CORBA.ConstructionPolicy 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.ConstructionPolicy) 044 { 045 return (org.omg.CORBA.ConstructionPolicy)obj; 046 } 047 else 048 { 049 throw new org.omg.CORBA.BAD_PARAM("Narrow failed"); 050 } 051 } 052 public static org.omg.CORBA.ConstructionPolicy 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.ConstructionPolicy) 059 { 060 return (org.omg.CORBA.ConstructionPolicy)obj; 061 } 062 else 063 { 064 throw new org.omg.CORBA.BAD_PARAM("Narrow failed"); 065 } 066 } 067 }