1 package org.ozoneDB.tools.OPP.srcgen.resolve; 9 10 import org.ozoneDB.tools.OPP.srcgen.MethodResolver; 11 12 import java.util.Map ; 13 14 19 public class UpdateMethodBagMapAdapter implements MethodResolver.UpdateMethodBag { 20 private Map methods; 21 22 public UpdateMethodBagMapAdapter(Map methods) { 23 this.methods = methods; 24 } 25 26 32 public void addMethod(String methodName, int lockLevel) { 33 if (methods.containsKey(methodName)) { 34 int oldLevel = ((Integer ) methods.get(methodName)).intValue(); 35 if (oldLevel >= lockLevel) { 36 return; 37 } 38 } 39 methods.put(methodName, new Integer (lockLevel)); 40 } 41 42 public boolean contains(String methodName) { 43 return methods.keySet().contains(methodName); 44 } 45 } 46 | Popular Tags |