1 26 27 package org.objectweb.ccm.IDL3; 28 29 37 38 public class ConsumesDeclImpl 39 extends EventsDeclImpl 40 implements ConsumesDecl 41 { 42 48 51 private org.omg.CORBA.ComponentIR.ConsumesDef consumes_def_; 52 53 56 private OperationDeclImpl[] client_mapping_; 57 58 64 69 protected 70 ConsumesDeclImpl(Repository rep, ScopeImpl parent) 71 { 72 super(rep, parent); 74 75 consumes_def_ = null; 77 client_mapping_ = null; 78 the_declaration_kind_ = DeclarationKind._dk_consumes; 79 } 80 81 87 92 protected void 93 load(org.omg.CORBA.Contained contained) 94 { 95 consumes_def_ = org.omg.CORBA.ComponentIR.ConsumesDefHelper.narrow(contained); 96 super.load(contained); 97 } 98 99 105 108 public void 109 create() 110 { 111 consumes_def_ = the_parent_.getComponentDef().create_consumes(getId(), 112 getName(), 113 getVersion(), 114 event_.getEventDef()); 115 116 super.create(); 117 } 118 119 125 128 public OperationDecl[] 129 getClientMapping() 130 { 131 if (client_mapping_!=null) 132 return client_mapping_; 133 134 InterfaceDecl client = ((ComponentDecl)the_parent_).getClientMapping(); 136 client.getContents(true, DeclarationKind._dk_null); 137 138 client_mapping_ = new OperationDeclImpl[1]; 139 client_mapping_[0] = (OperationDeclImpl)client.find("get_consumer_"+getName()); 140 141 return client_mapping_; 142 } 143 144 150 155 protected org.omg.CORBA.Contained 156 getContained() 157 { 158 return consumes_def_; 159 } 160 } 161 | Popular Tags |