public Method getTargetClassMethod(Method method) { if (methodCache.containsKey(method)) { return methodCache.get(method); } Method result = getTargetClassMethod(method, customImplementationClass); if (!result.equals(method)) { methodCache.put(method, result); return result; } result = getTargetClassMethod(method, repositoryBaseClass); methodCache.put(method, result); return result; }
/** * Returns whether the given method is considered to be a repository base class method. * * @param method * @return */ private boolean isTargetClassMethod(Method method, Class<?> targetType) { Assert.notNull(method); if (targetType == null) { return false; } if (method.getDeclaringClass().isAssignableFrom(targetType)) { return true; } return !method.equals(getTargetClassMethod(method, targetType)); }