1 26 27 package org.objectweb.openccm.ir3; 28 29 import org.omg.CORBA.*; 31 32 40 41 public class ValueMemberDef_impl 42 extends FeatureContained 43 implements ValueMemberDefOperations 44 { 45 51 52 protected IDLType_ref type_def_; 53 54 55 protected short access_; 56 57 63 64 public 65 ValueMemberDef_impl(IFR ifr, 66 Container_impl container) 67 { 68 super(ifr, container); 70 71 setServant(new ValueMemberDefPOATie(this)); 73 74 type_def_ = new IDLType_ref(this); 76 77 access_ = (short)1; 79 } 80 81 87 91 protected TypeCode 92 recursiveType(java.util.List idSeq) 93 { 94 try 95 { 96 Contained_impl cont = (Contained_impl)type_def_.getBaseImpl(); 97 int idx = idSeq.indexOf(cont.id()); 98 if (idx!=-1) 99 return getIFR().getTCF().create_recursive_tc(cont.id()); 100 } 101 catch(java.lang.ClassCastException ex) 102 { 103 } 104 105 return type_def_.recursiveType(idSeq); 106 } 107 108 114 117 public ValueMemberDef 118 asValueMemberDef() 119 { 120 return ValueMemberDefHelper.narrow(asObject()); 121 } 122 123 126 public ValueMember 127 getValueMember() 128 { 129 ValueMember description = new ValueMember(); 131 132 description.name = name(); 134 description.id = id(); 135 description.defined_in = getContainerID(); 136 description.version = version(); 137 description.type = type(); 138 description.type_def = type_def(); 139 description.access = access(); 140 141 return description; 142 } 143 144 147 public ValueMember 148 getValueMember(java.util.List idSeq) 149 { 150 ValueMember description = new ValueMember(); 152 153 description.name = name(); 155 description.id = id(); 156 description.defined_in = getContainerID(); 157 description.version = version(); 158 description.type = recursiveType(idSeq); 159 description.type_def = type_def(); 160 description.access = access(); 161 162 return description; 163 } 164 165 171 174 public void 175 setDescriptionValue(Any any) 176 { 177 ValueMemberHelper.insert(any, getValueMember()); 179 } 180 181 187 190 protected void 191 cutDependencies() 192 { 193 type_def_.cutDependency(); 195 196 super.cutDependencies(); 198 } 199 200 206 209 public DefinitionKind 210 def_kind() 211 { 212 return DefinitionKind.dk_ValueMember; 213 } 214 215 221 224 public TypeCode 225 type() 226 { 227 java.util.List idSeq = new java.util.ArrayList (); 229 return recursiveType(idSeq); 230 } 231 232 235 public IDLType 236 type_def() 237 { 238 return type_def_.asIDLType(); 240 } 241 242 245 public void 246 type_def(IDLType val) 247 { 248 type_def_.setDependency( castToLocal(val) ); 251 } 252 253 256 public short 257 access() 258 { 259 return access_; 260 } 261 262 265 public void 266 access(short val) 267 { 268 access_ = val; 269 } 270 } 271 | Popular Tags |