From 735f9ad57490d2b51bf2909344dc43b29322b6e1 Mon Sep 17 00:00:00 2001 From: Gabriel Pettier Date: Sat, 14 Dec 2019 14:27:22 +0100 Subject: [PATCH] use getDeclaredMethods for current class, then getMethods for parent classes? --- jnius/reflect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jnius/reflect.py b/jnius/reflect.py index 0c16f34..e872907 100644 --- a/jnius/reflect.py +++ b/jnius/reflect.py @@ -219,7 +219,10 @@ def autoclass(clsname): cls = c while cls is not None: - methods = cls.getMethods() + if cls is c: + methods = cls.getDeclaredMethods() + else: + methods = cls.getMethods() methods_name = [x.getName() for x in methods] for index, method in enumerate(methods):