public static <T> Method methodByName(Class<T> aClass, String name) {
        for (Method m : aClass.getMethods()) {
            if (m.getName().equals(name)) {
                return m;
            }
        }
        return null;
    }
A collection of helper methods.

@author Tomasz Bak
ribbon/src/main/java/com/netflix/ribbon/proxy/Utils.java