1 26 27 package org.objectweb.openccm.ast.lib; 28 29 import org.objectweb.openccm.ast.api.TypeKind; 31 import org.objectweb.openccm.ast.api.DeclarationKind; 32 import org.omg.CORBA.InterfaceDef ; 33 import org.omg.CORBA.ExtInterfaceDef; 34 import org.omg.CORBA.AbstractInterfaceDef; 35 import org.omg.CORBA.ExtAbstractInterfaceDef; 36 import org.omg.CORBA.ExtAbstractInterfaceDefHelper; 37 38 50 51 public class AbstractInterfaceDeclImpl 52 extends InterfaceDeclImpl 53 implements org.objectweb.openccm.ast.api.AbstractInterfaceDecl 54 { 55 61 62 private ExtAbstractInterfaceDef ext_abstract_interface_def_; 63 64 70 76 protected 77 AbstractInterfaceDeclImpl(Repository rep, 78 ScopeImpl parent) 79 { 80 super(rep, parent); 82 83 ext_abstract_interface_def_ = null; 85 } 86 87 93 99 104 protected void 105 load(org.omg.CORBA.Contained contained) 106 { 107 ext_abstract_interface_def_ = 108 ExtAbstractInterfaceDefHelper.narrow(contained); 109 super.load(contained); 110 } 111 112 117 protected void 118 loadAsMapping(org.omg.CORBA.Contained contained) 119 { 120 ext_abstract_interface_def_ = 121 ExtAbstractInterfaceDefHelper.narrow(contained); 122 super.load(contained); 123 } 124 125 131 protected org.omg.CORBA.Contained 132 getContained() 133 { 134 return ext_abstract_interface_def_; 135 } 136 137 143 149 protected org.omg.CORBA.Container 150 getContainer() 151 { 152 return ext_abstract_interface_def_; 153 } 154 155 161 167 170 protected void 171 createContainer() 172 { 173 AbstractInterfaceDef[] itfs = 174 new AbstractInterfaceDef[inherited_interfaces_.getSize()]; 175 176 for(int i=0; i<itfs.length; i++) 177 itfs[i] = ((AbstractInterfaceDeclImpl) 178 (inherited_interfaces_.get(i))). 179 getExtAbstractInterfaceDef(); 180 181 ext_abstract_interface_def_ = the_parent_.getContainer(). 182 create_ext_abstract_interface(getId(), getName(), 183 getVersion(), itfs); 184 } 185 186 192 198 public ExtInterfaceDef 199 getExtInterfaceDef() 200 { 201 return ext_abstract_interface_def_; 202 } 203 204 210 public InterfaceDef 211 getInterfaceDef() 212 { 213 return ext_abstract_interface_def_; 214 } 215 216 222 public ExtAbstractInterfaceDef 223 getExtAbstractInterfaceDef() 224 { 225 return ext_abstract_interface_def_; 226 } 227 228 234 public AbstractInterfaceDef 235 getAbstractInterfaceDef() 236 { 237 return ext_abstract_interface_def_; 238 } 239 240 246 252 257 public long 258 getDeclKind() 259 { 260 return DeclarationKind.dk_abstract_interface; 261 } 262 263 269 275 281 286 public TypeKind 287 getTypeKind() 288 { 289 return TypeKind.tk_abstract_interface; 290 } 291 292 298 304 310 315 public org.omg.CORBA.IDLType 316 getIDLType() 317 { 318 return ext_abstract_interface_def_; 319 } 320 } 321 | Popular Tags |