code: public static int methodDistance(Method from, Method to) {
          return from.getName().equals(to.getName())
              && to.getDeclaringClass().isAssignableFrom(from.getDeclaringClass())
              ? classDistance(from.getDeclaringClass(), to.getDeclaringClass())
              : -1;
      }
docs: Calculates distance between from and to methods.
  @return -1 if this converter can not handle method value greater or equals then 0 otherwise
  (0 - highest priority)