1 27 package org.objectweb.openccm.Containers.MetaInformation; 28 29 35 public class MI_TypeFactory 36 extends TypeImpl 37 { 38 private InterfaceTypeImpl _tmp_inf; 39 private OperationTypeImpl _tmp_op; 40 private AttributeTypeImpl _tmp_att; 41 private FacetPortTypeImpl _tmp_fpt; 42 private ReceptaclePortTypeImpl _tmp_rpt; 43 private ConsumerPortTypeImpl _tmp_cpt; 44 private EmitterPortTypeImpl _tmp_ept; 45 private PublisherPortTypeImpl _tmp_ppt; 46 47 68 69 public InterfaceType create_interface_type( 70 String name, 71 String rep_id, 72 String entrypt, 73 type_kind ik, 74 TypeImpl ref 75 ) 76 { 77 _tmp_inf = new InterfaceTypeImpl(); 78 79 _tmp_inf._type = ref; 80 _tmp_inf._rep_id = rep_id; 81 _tmp_inf._type_instance_factory_entrypt = entrypt; 82 _tmp_inf._name = name; 83 _tmp_inf._type_kind = ik; 84 85 86 return _tmp_inf; 87 } 88 89 106 107 public OperationType create_operation_type( 108 String name, 109 String rep_id, 110 String entrypt, 111 type_kind ik, 112 TypeImpl ref 113 114 ) 115 { 116 _tmp_op = new OperationTypeImpl(); 117 118 _tmp_op._type = ref; 119 _tmp_op._rep_id = rep_id; 120 _tmp_op._name = name; 121 _tmp_op._type_kind = ik; 122 _tmp_op._type_instance_factory_entrypt = entrypt; 123 124 return _tmp_op; 125 } 126 127 148 149 public AttributeType create_attribute_type( 150 String name, 151 String rep_id, 152 String entrypt, 153 type_kind ik, 154 TypeImpl ref_type 155 ) 156 { 157 _tmp_att = new AttributeTypeImpl(); 158 159 _tmp_att._type = ref_type; 160 _tmp_att._rep_id = rep_id; 161 _tmp_att._name = name; 162 _tmp_att._type_kind = ik; 163 _tmp_att._type_instance_factory_entrypt = entrypt; 164 165 return _tmp_att; 166 } 167 168 185 186 public FacetPortType create_facet_port_type( 187 String name, 188 String rep_id, 189 String entrypt, 190 type_kind ik, 191 TypeImpl ref 192 ) 193 { 194 _tmp_fpt = new FacetPortTypeImpl(); 195 196 _tmp_fpt._rep_id = rep_id; 197 _tmp_fpt._name = name; 198 _tmp_fpt._type_kind = ik; 199 _tmp_fpt._type_instance_factory_entrypt = entrypt; 200 201 _tmp_fpt._interface_type = null; 202 203 return _tmp_fpt; 204 } 205 206 207 public FacetPortType facet_bind(InterfaceType type_ref) 208 { 209 try 210 { 211 _tmp_fpt._interface_type = type_ref; 212 } 213 catch (ClassCastException e) 214 { 215 System.err.println("Enable to cast from Type to InterfacesType :-( in facet"); 216 }; 217 218 return _tmp_fpt; 219 } 220 221 238 239 public ReceptaclePortType create_receptacle_port_type( 240 String name, 241 String rep_id, 242 String entrypt, 243 type_kind ik, 244 TypeImpl ref, 245 boolean multiplex, 246 int max_connections 247 248 ) 249 { 250 _tmp_rpt = new ReceptaclePortTypeImpl(); 251 252 _tmp_rpt._is_multiple = multiplex; 253 _tmp_rpt._max_connections = max_connections; 254 _tmp_rpt._type = ref; 255 _tmp_rpt._rep_id = rep_id; 256 _tmp_rpt._name = name; 257 _tmp_rpt._type_kind = ik; 258 _tmp_rpt._type_instance_factory_entrypt = entrypt; 259 _tmp_rpt._interface_type = null; 260 261 return _tmp_rpt; 262 } 263 264 public ReceptaclePortType receptacle_bind(InterfaceType type_ref) 265 { 266 try 267 { 268 _tmp_rpt._interface_type = type_ref; 269 } 270 catch (ClassCastException e) 271 { 272 System.err.println("Enable to assign InterfacesType :-( in receptacle"); 273 }; 274 275 return _tmp_rpt; 276 } 277 278 295 296 public ConsumerPortType create_consumer_port_type( 297 String name, 298 String rep_id, 299 String entrypt, 300 type_kind ik, 301 TypeImpl ref 302 303 ) 304 { 305 _tmp_cpt = new ConsumerPortTypeImpl(); 306 307 _tmp_cpt._type = ref; 308 _tmp_cpt._rep_id = rep_id; 309 _tmp_cpt._name = name; 310 _tmp_cpt._type_kind = ik; 311 _tmp_cpt._type_instance_factory_entrypt = entrypt; 312 313 return _tmp_cpt; 314 } 315 316 333 334 public EmitterPortType create_emitter_port_type( 335 String name, 336 String rep_id, 337 String entrypt, 338 type_kind ik, 339 TypeImpl ref 340 ) 341 { 342 _tmp_ept = new EmitterPortTypeImpl(); 343 344 _tmp_ept._type = ref; 345 _tmp_ept._rep_id = rep_id; 346 _tmp_ept._name = name; 347 _tmp_ept._type_kind = ik; 348 _tmp_ept._type_instance_factory_entrypt = entrypt; 349 350 return _tmp_ept; 351 } 352 353 370 371 public PublisherPortType create_publisher_port_type( 372 String name, 373 String rep_id, 374 String entrypt, 375 type_kind ik, 376 TypeImpl ref 377 ) 378 { 379 _tmp_ppt = new PublisherPortTypeImpl(); 380 381 _tmp_ppt._type = ref; 382 _tmp_ppt._rep_id = rep_id; 383 _tmp_ppt._name = name; 384 _tmp_ppt._type_kind = ik; 385 _tmp_ppt._type_instance_factory_entrypt = entrypt; 386 387 return _tmp_ppt; 388 } 389 390 } 391 | Popular Tags |