/** * Returns a multimap of the mapping method-name -> [methods]. Useful to find overloaded methods in a class hierarchy. * * @param klass Class * @return Multimap of method-name -> [methods] */ public static Multimap<String, Method> getMethodsMultimap( Class<?> klass ) { Multimap<String, Method> methods = ArrayListMultimap.create(); getMethods( klass ).forEach( method -> methods.put( method.getName(), method ) ); return methods; } }