1 26 27 package org.objectweb.openccm.ir3; 28 29 import org.omg.CORBA.*; 31 32 40 41 public class AliasDef_impl 42 extends Contained_impl 43 implements AliasDefOperations 44 { 45 51 52 protected IDLType_ref original_type_def_; 53 54 60 63 public 64 AliasDef_impl(IFR ifr, 65 Container_impl container) 66 { 67 super(ifr, container); 69 70 setServant(new AliasDefPOATie(this)); 72 73 original_type_def_ = new IDLType_ref(this); 75 } 76 77 83 87 protected TypeCode 88 recursiveType(java.util.List idSeq) 89 { 90 try 91 { 92 Contained_impl cont = (Contained_impl)original_type_def_.getBaseImpl(); 93 int idx = idSeq.indexOf(cont.id()); 94 if (idx!=-1) 95 { 96 int dk = cont.def_kind().value(); 98 if ((dk!=DefinitionKind._dk_Struct) && 99 (dk!=DefinitionKind._dk_Exception) && 100 (dk!=DefinitionKind._dk_Union) && 101 (dk!=DefinitionKind._dk_Value) && 102 (dk!=DefinitionKind._dk_Alias)) 103 throw exceptionIllegalRecursion(id(), cont.id()); 104 } 105 } 106 catch (java.lang.ClassCastException ex) 107 { 108 } 109 110 TypeCode tc = original_type_def_.recursiveType(idSeq); 111 112 return getIFR().getTCF().create_alias_tc(id(), name(), tc); 114 } 115 116 122 125 protected void 126 cutDependencies() 127 { 128 original_type_def_.cutDependency(); 130 131 super.cutDependencies(); 133 } 134 135 141 144 public AliasDef 145 asAliasDef() 146 { 147 return AliasDefHelper.narrow(asObject()); 148 } 149 150 156 159 public DefinitionKind 160 def_kind() 161 { 162 return DefinitionKind.dk_Alias; 163 } 164 165 171 174 public TypeCode 175 type() 176 { 177 java.util.List idSeq = new java.util.ArrayList (); 179 return recursiveType(idSeq); 180 } 181 182 188 191 public IDLType 192 original_type_def() 193 { 194 return original_type_def_.asIDLType(); 196 } 197 198 201 public void 202 original_type_def(IDLType val) 203 { 204 original_type_def_.setDependency( castToLocal(val) ); 207 } 208 } 209 | Popular Tags |