1 26 27 package org.objectweb.openccm.ast.lib; 28 29 30 import org.objectweb.openccm.ast.api.DeclarationKind; 31 32 33 import org.objectweb.openccm.ast.api.InterfaceDecl; 34 35 36 import org.objectweb.openccm.ast.api.OperationDecl; 37 38 39 import org.objectweb.openccm.ast.api.HomeDecl; 40 41 58 59 abstract public class HomeOperationBaseImpl 60 extends OperationDeclImpl 61 implements org.objectweb.openccm.ast.api.HomeOperationBase 62 { 63 69 70 private OperationDecl[] client_mapping_; 71 72 73 private OperationDecl[] local_mapping_; 74 75 81 86 protected 87 HomeOperationBaseImpl(Repository rep, 88 ScopeImpl parent) 89 { 90 super(rep, parent); 92 93 client_mapping_ = null; 95 local_mapping_ = null; 96 } 97 98 104 110 116 122 128 134 139 public OperationDecl[] 140 getClientMapping() 141 { 142 if (client_mapping_ == null) 143 { 144 InterfaceDecl client = ((HomeDecl)the_parent_). 146 getClientExplicitMapping(); 147 client.getContents(true, DeclarationKind.dk_null); 148 149 client_mapping_ = new OperationDecl[1]; 150 client_mapping_[0] = (OperationDecl)client.find(getName()); 151 } 152 return client_mapping_; 153 } 154 155 161 166 public OperationDecl[] 167 getLocalMapping() 168 { 169 if (local_mapping_ == null) 170 { 171 InterfaceDecl local = ((HomeDecl)the_parent_).getLocalMapping(); 173 local.getContents(true, DeclarationKind.dk_null); 174 175 local_mapping_ = new OperationDecl[1]; 176 local_mapping_[0] = (OperationDecl)local.find(getName()); 177 } 178 return local_mapping_; 179 } 180 181 187 } 188 | Popular Tags |