}
protected Set<Entry<String, Multimethod>> findMultimethods(Context context, Obj matchingValue) {
Map<String, Multimethod> matching = new TreeMap<String, Multimethod>();
Scope scope = context.getModule().getScope();
while (scope != null) {
for(Entry<String, Multimethod> multimethod : scope.getMultimethods().entrySet()) {
for(Callable method : multimethod.getValue().getMethods()) {
if(isMatchingMethod(matchingValue, context, method)) {
matching.put(multimethod.getKey(), multimethod.getValue());
break;
}
}
}
scope = scope.getParent();
}
return matching.entrySet();
}