1 26 27 package org.objectweb.openccm.ir3; 28 29 import org.omg.CORBA.*; 31 32 40 41 public class ExceptionDef_impl 42 extends Container_impl 43 implements ExceptionDefOperations 44 { 45 51 54 public 55 ExceptionDef_impl(IFR ifr, 56 Container_impl container) 57 { 58 super(ifr, container); 60 61 setServant(new ExceptionDefPOATie(this)); 63 64 members_ = new StructMembers(this, this); 66 } 67 68 74 77 protected StructMembers members_; 78 79 85 89 protected TypeCode 90 recursiveType(java.util.List idSeq) 91 { 92 idSeq.add(id()); 93 StructMember[] members = members_.getStructMemberSeq(idSeq); 94 idSeq.remove(id()); 95 96 return getIFR().getTCF().create_exception_tc(id(), name(), members); 98 } 99 100 106 109 static public ExceptionDescription[] 110 compute_ExcDescriptionSeq(ExceptionDef_ref[] seq) 111 { 112 ExceptionDescription[] result = 113 new ExceptionDescription[seq.length]; 114 115 for(int i=0; i<seq.length; i++) 116 result[i] = seq[i].getImpl().getExceptionDescription(); 117 118 return result; 119 } 120 121 127 130 public ExceptionDef 131 asExceptionDef() 132 { 133 return ExceptionDefHelper.narrow(asObject()); 134 } 135 136 139 public ExceptionDescription 140 getExceptionDescription() 141 { 142 ExceptionDescription description = 144 new ExceptionDescription(); 145 146 description.name = name(); 148 description.id = id(); 149 description.defined_in = getContainerID(); 150 description.version = version(); 151 description.type = type(); 152 153 return description; 154 } 155 156 162 165 public void 166 setDescriptionValue(Any any) 167 { 168 ExceptionDescriptionHelper.insert(any, getExceptionDescription()); 170 } 171 172 178 181 public boolean 182 checkDefinitionKind(DefinitionKind dk) 183 { 184 return (dk == DefinitionKind.dk_Struct) 186 || (dk == DefinitionKind.dk_Union) 187 || (dk == DefinitionKind.dk_Enum); 188 } 189 190 193 public void 194 checkName(String name, 195 boolean exclude_inherited, 196 boolean in_inherited) 197 { 198 super.checkName(name, exclude_inherited, in_inherited); 200 201 members_.checkName(name); 203 } 204 205 211 214 protected void 215 cutDependencies() 216 { 217 members_.cutDependencies(); 219 220 super.cutDependencies(); 222 } 223 224 230 233 public DefinitionKind 234 def_kind() 235 { 236 return DefinitionKind.dk_Exception; 237 } 238 239 245 251 254 public TypeCode 255 type() 256 { 257 java.util.List idSeq = new java.util.ArrayList (); 259 return recursiveType(idSeq); 260 } 261 262 265 public StructMember[] 266 members() 267 { 268 return members_.getStructMemberSeq(); 270 } 271 272 275 public void 276 members(StructMember[] val) 277 { 278 members_.setStructMemberSeq(val); 280 } 281 } 282 | Popular Tags |