use getDeclaredMethods for current class, then getMethods for parent

classes?
This commit is contained in:
Gabriel Pettier 2019-12-14 14:27:22 +01:00
parent c2316cf00e
commit 735f9ad574
1 changed files with 4 additions and 1 deletions

View File

@ -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):