@Override protected Method findMatchingMethod(String methodName, Object instance, Object... args) { MethodKey key = new MethodKey(instance.getClass(), methodName, args.length); Method cached = methodsByNameAndArgs.get(key); if (cached == noMethod) return null; if (cached != null) return cached; Method method = handleMethodCacheMiss(methodName, instance, args); if (method == null) { methodsByNameAndArgs.put(key, noMethod); } else { methodsByNameAndArgs.put(key, method); } return method; }
@Override protected Method findMatchingMethod(String methodName, Object instance, Object... args) { MethodKey key = new MethodKey(instance.getClass(), methodName, args.length); Method cached = methodsByNameAndArgs.get(key); if (cached == noMethod) return null; if (cached != null) return cached; Method method = handleMethodCacheMiss(methodName, instance, args); if (method == null) { methodsByNameAndArgs.put(key, noMethod); } else { methodsByNameAndArgs.put(key, method); } return method; }