mirror of https://github.com/kivy/pyjnius.git
Avoid replacing existing fields with getter methods
from @dschiller & @jianbing https://github.com/kivy/pyjnius/issues/405
This commit is contained in:
parent
e685086aba
commit
b2632cd0bc
|
@ -239,6 +239,7 @@ def autoclass(clsname):
|
|||
classDict[name] = (JavaStaticMethod if static else JavaMethod)(sig, varargs=varargs)
|
||||
if name != 'getClass' and bean_getter(name) and len(method.getParameterTypes()) == 0:
|
||||
lowername = lower_name(name[2 if name.startswith('is') else 3:])
|
||||
if lowername not in methods_name:
|
||||
classDict[lowername] = (lambda n: property(lambda self: getattr(self, n)()))(name)
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue