Replace `getMethods()` with `getDeclaredMethods()`

- The while-loop loops through all the parents.
- `Class.getMethods()` gets all the methods from all superclasses.
So basicly we are doing things twice here.

When extending from Activity (or another Android framework class), this means that `getMethods()` will return all methods of all superclasses (multiple times because of the while-loop), so that's a lot of redundant string-comparison.