code: protected CachableMethod resolveCacheableMethod(Method targetMethod) {
          final Class<?> targetClass = targetMethod.getDeclaringClass();
          for (final CachableMethod cachableMethod : CachableMethod.values()) {
              Method cacheableMethod = null;
              try {
                  cacheableMethod =
                          targetClass.getMethod(cachableMethod.getName(), cachableMethod.getArgs());
              } catch (SecurityException e) {
                  this.logger.warn(
                          "Security exception while attempting to if the target class '"
                                  + targetClass
                                  + "' implements the cachable method '"
                                  + cachableMethod
                                  + "'",
                          e);
              } catch (NoSuchMethodException e) {
                  final String message =
                          "Taret class '"
                                  + targetClass
                                  + "' does not implement possible cachable method '"
                                  + cachableMethod
                                  + "'. Is the advice applied to the correct bean and methods?";
  
                  if (this.logger.isDebugEnabled()) {
                      this.logger.debug(message, e);
                  } else {
                      this.logger.warn(message);
                  }
              }
  
              if (targetMethod.equals(cacheableMethod)) {
                  return cachableMethod;
              }
          }
  
          throw new IllegalArgumentException(
                  "Do not know how to generate a cache for for '"
                          + targetMethod
                          + "' on class '"
                          + targetClass
                          + "'. Is the advice applied to the correct bean and methods?");
      }
docs: Iterates over the {@link CachableMethod} instances to determine which instance the passed
  {@link MethodInvocation} applies to.