1 26 27 package org.objectweb.openccm.ir3; 28 29 import org.omg.CORBA.*; 31 32 40 41 public class AbstractInterfaceDef_impl 42 extends InterfaceDef_impl 43 implements AbstractInterfaceDefOperations 44 { 45 51 public 52 AbstractInterfaceDef_impl(IFR ifr, 53 Container_impl container) 54 { 55 super(ifr, container, false); 57 58 setServant(new AbstractInterfaceDefPOATie(this)); 60 } 61 62 68 74 77 public AbstractInterfaceDef 78 asAbstractInterfaceDef() 79 { 80 return AbstractInterfaceDefHelper.narrow(asObject()); 81 } 82 83 86 public void 87 base_interfaces(AbstractInterfaceDef[] val) 88 { 89 InterfaceDef[] tmp = new InterfaceDef[val.length]; 90 for(int i=0; i<tmp.length; i++) 91 tmp[i] = val[i]; 92 93 super.base_interfaces(tmp); 94 } 95 96 102 105 public DefinitionKind 106 def_kind() 107 { 108 return DefinitionKind.dk_AbstractInterface; 109 } 110 111 117 120 public TypeCode 121 type() 122 { 123 return getIFR().getTCF().create_abstract_interface_tc(id(), name()); 125 } 126 127 133 136 public void 137 base_interfaces(InterfaceDef[] itfs) 138 { 139 for(int i=0; i<itfs.length; i++) 141 if(itfs[i].def_kind() != DefinitionKind.dk_AbstractInterface) 142 throw exceptionInvalidAbstractInterfaceInheritance( 143 itfs[i].absolute_name()); 144 145 super.base_interfaces(itfs); 146 } 147 148 151 public boolean 152 is_a(String interface_id) 153 { 154 if(interface_id.equals(id())) 155 return true; 156 157 if(interface_id.equals("IDL:omg.org/CORBA/AbstractBase:1.0")) 158 return true; 159 160 for(int i=0; i<base_interfaces_.length; i++) 161 if (base_interfaces_[i].getImpl().is_a(interface_id)) 162 return true; 163 164 return false; 165 } 166 } 167 | Popular Tags |