public Method findMethod(String name,Object[] params) throws MethodMap.AmbiguousException {
  String methodKey=makeMethodKey(name,params);
  Object cacheEntry=methodCache.get(methodKey);
  if (cacheEntry == CACHE_MISS) {
    return null;
  }
  if (cacheEntry == null) {
    try {
      cacheEntry=methodMap.find(name,params);
    }
 catch (    MethodMap.AmbiguousException ae) {
      methodCache.put(methodKey,CACHE_MISS);
      throw ae;
    }
    if (cacheEntry == null) {
      methodCache.put(methodKey,CACHE_MISS);
    }
 else {
      methodCache.put(methodKey,cacheEntry);
    }
  }
  return (Method)cacheEntry;
}

public Method findMethod ( String name , Object [ ] params ) throws MethodMap . AmbiguousException { String methodKey = makeMethodKey ( name , params ) ; Object cacheEntry = methodCache . get ( methodKey ) ; if ( cacheEntry == CACHE_MISS ) { return null ; } if ( cacheEntry == null ) { try { cacheEntry = methodMap . find ( name , params ) ; } catch ( MethodMap . AmbiguousException ae ) { methodCache . put ( methodKey , CACHE_MISS ) ; throw ae ; } if ( cacheEntry == null ) { methodCache . put ( methodKey , CACHE_MISS ) ; } else { methodCache . put ( methodKey , cacheEntry ) ; } } return ( Method ) cacheEntry ; }
find a method using the methodkey provided . look in the methodmap for an entry . if found , it ' ll either be a cache_miss , in which case we simply give up , or it ' ll be a method , in which case , we return it . if nothing is found , then we must actually go and introspect the method from the methodmap .
