public static List < Method > getAllMethods ( List < Method > methods , Class < ? > clazz ) { for ( Method method : clazz . getDeclaredMethods ( ) ) { methods . add ( method ) ; } if ( clazz . getSuperclass ( ) != null ) { methods = getAllMethods ( methods , clazz . getSuperclass ( ) ) ; } return methods ; }
This static method will get ALL methods for this class including any inherited ones .