public static Method [ ] getAllMethods ( Class < ? > clz ) { Set < Method > set = new HashSet <> ( ) ; List < Class < ? > > classes = new ArrayList <> ( ) ; classes . add ( clz ) ; classes . addAll ( Arrays . asList ( getAllSuperClasses ( clz ) ) ) ; classes . addAll ( Arrays . asList ( getAllInterfaces ( clz ) ) ) ; for ( Class < ? > c : classes ) { set . addAll ( Arrays . asList ( c . getDeclaredMethods ( ) ) ) ; } return set . toArray ( new Method [ set . size ( ) ] ) ; }
Get all methods