code: private static Method findMatchingMethod(Method originalMethod, String methodName, Type classToSearch, ResolutionContext ctx, Class<?> originalClass) {
          // Check self
          Method result = findMethodOnClass(originalMethod, methodName, classToSearch, ctx, originalClass);
  
          // Check interfaces
          if (result == null) {
              for (Type iface : getClass(classToSearch).getGenericInterfaces()) {
                  ctx.push(iface);
                  result = findMatchingMethod(originalMethod, methodName, iface, ctx, originalClass);
                  ctx.pop();
                  if (result != null) {
                      break;
                  }
              }
          }
  
          // Check superclass
          if (result == null) {
              Type superclass = getClass(classToSearch).getGenericSuperclass();
              if (superclass != null) {
                  ctx.push(superclass);
                  result = findMatchingMethod(originalMethod, methodName, superclass, ctx, originalClass);
                  ctx.pop();
              }
          }
  
          return result;
      }
docs: Recursively search the class hierarchy of {@code clazzToCheck} to find a method named {@code methodName} with the same signature as {@code originalMethod}
  
  @param originalMethod the original method
  @param methodName the name of the method to search for
  @param classToSearch the class to search
  @param ctx the resolution context
  @param originalClass the class which declared {@code originalMethod}
  @return a method named {@code methodName}, in the class hierarchy of {@code clazzToCheck}, which matches the signature of {@code originalMethod}, or {@code null} if one
  cannot be found