@Nullable
    public static Method findMethod(Class<?> clazz, String name, @Nullable Class<?>... paramTypes) {
        Assert.notNull(clazz, "Class must not be null");
        Assert.notNull(name, "Method name must not be null");
        Class<?> searchType = clazz;
        while (searchType != null) {
            Method[] methods = (searchType.isInterface() ? searchType.getMethods() :
                getDeclaredMethods(searchType, false));
            for (Method method : methods) {
                if (name.equals(method.getName()) && (paramTypes == null || hasSameParams(method, paramTypes))) {
                    return method;
                }
            }
            searchType = searchType.getSuperclass();
        }
        return null;
    }
Attempt to find a {@link Method} on the supplied class with the supplied name
and parameter types. Searches all superclasses up to {@code Object}.
<p>Returns {@code null} if no {@link Method} can be found.

@param clazz      the class to introspect
@param name       the name of the method
@param paramTypes the parameter types of the method
                  (may be {@code null} to indicate any signature)
@return the Method object, or {@code null} if none found
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/util/ReflectionUtils.java