public static Method lookupMethod ( Class parentClass , String methodName , Class [ ] signature ) { try { return parentClass . getDeclaredMethod ( methodName , signature ) ; } catch ( NoSuchMethodException e ) { Class superClass = parentClass . getSuperclass ( ) ; return superClass != null ? lookupMethod ( superClass , methodName , signature ) : null ; } }
Get a Method in a Class .