1 26 27 package org.objectweb.openccm.corba; 28 29 36 37 public abstract class TheDynamicAnyFactory 38 { 39 45 48 private static org.omg.DynamicAny.DynAnyFactory factory_ = null; 49 50 56 59 private 60 TheDynamicAnyFactory() 61 { 62 } 63 64 70 76 81 public static org.omg.DynamicAny.DynAnyFactory 82 getFactory() 83 { 84 if(factory_ == null) 85 { 86 factory_ = org.omg.DynamicAny.DynAnyFactoryHelper.narrow( 87 TheORB.resolve_initial_reference("DynAnyFactory")); 88 } 89 return factory_; 90 } 91 92 97 public static void 98 setFactory(org.omg.DynamicAny.DynAnyFactory factory) 99 { 100 factory_ = factory; 101 } 102 103 110 public static org.omg.DynamicAny.DynAny 111 create_dyn_any_from_type_code(org.omg.CORBA.TypeCode tc) 112 { 113 try 114 { 115 return getFactory().create_dyn_any_from_type_code(tc); 116 } 117 catch(org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode exc) 118 { 119 throw new UserExceptionWrapper(exc); 121 } 122 } 123 124 131 public static org.omg.DynamicAny.DynEnum 132 create_dyn_enum(org.omg.CORBA.Any any) 133 { 134 try 135 { 136 return org.omg.DynamicAny.DynEnumHelper.narrow( 137 getFactory().create_dyn_any(any)); 138 } 139 catch (org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode exc) 140 { 141 throw new UserExceptionWrapper(exc); 143 } 144 } 145 146 153 public static org.omg.DynamicAny.DynFixed 154 create_dyn_fixed(org.omg.CORBA.Any any) 155 { 156 try 157 { 158 return org.omg.DynamicAny.DynFixedHelper.narrow( 159 getFactory().create_dyn_any(any)); 160 } 161 catch (org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode exc) 162 { 163 throw new UserExceptionWrapper(exc); 165 } 166 } 167 } 168 | Popular Tags |