1 26 27 package org.objectweb.ccm.IDL3; 28 29 37 38 public class FinderDeclImpl 39 extends OperationDeclImpl 40 implements FinderDecl 41 { 42 48 51 private org.omg.CORBA.ComponentIR.FinderDef finder_def_; 52 53 56 private OperationDeclImpl[] client_mapping_; 57 58 61 private OperationDeclImpl[] local_mapping_; 62 63 69 74 protected 75 FinderDeclImpl(Repository rep, ScopeImpl parent) 76 { 77 super(rep, parent); 79 80 finder_def_ = null; 82 client_mapping_ = null; 83 local_mapping_ = null; 84 the_declaration_kind_ = DeclarationKind._dk_finder; 85 } 86 87 93 98 protected void 99 load(org.omg.CORBA.Contained contained) 100 { 101 finder_def_ = org.omg.CORBA.ComponentIR.FinderDefHelper.narrow(contained); 102 super.load(contained); 103 } 104 105 111 114 public void 115 create() 116 { 117 finder_def_ = the_parent_.getHomeDef().create_finder(getId(), 118 getName(), 119 getVersion(), 120 parameters_.getParameterDescs(), 121 exceptions_.getExceptionDefs()); 122 } 123 124 130 133 public OperationDecl[] 134 getClientMapping() 135 { 136 if (client_mapping_!=null) 137 return client_mapping_; 138 139 InterfaceDecl client = ((HomeDecl)the_parent_).getClientExplicitMapping(); 141 client.getContents(true, DeclarationKind._dk_null); 142 143 client_mapping_ = new OperationDeclImpl[1]; 144 client_mapping_[0] = (OperationDeclImpl)client.find(getName()); 145 146 return client_mapping_; 147 } 148 149 152 public OperationDecl[] 153 getLocalMapping() 154 { 155 if (local_mapping_!=null) 156 return local_mapping_; 157 158 InterfaceDecl local = ((HomeDecl)the_parent_).getLocalMapping(); 160 local.getContents(true, DeclarationKind._dk_null); 161 162 local_mapping_ = new OperationDeclImpl[1]; 163 local_mapping_[0] = (OperationDeclImpl)local.find(getName()); 164 165 return local_mapping_; 166 } 167 168 174 179 protected org.omg.CORBA.Contained 180 getContained() 181 { 182 return finder_def_; 183 } 184 } 185 | Popular Tags |