public static Method [ ] getAllDeclaredMethods ( Class < ? > leafClass ) { final List < Method > methods = new ArrayList < Method > ( 32 ) ; doWithMethods ( leafClass , new MethodCallback ( ) { public void doWith ( Method method ) { methods . add ( method ) ; } } ) ; return methods . toArray ( new Method [ methods . size ( ) ] ) ; }
Get all declared methods on the leaf class and all superclasses . Leaf class methods are included first .