Search code examples
pythonjpype

JPype's properties access shadows method with property name


How can I access a Java method named next() when the same class has a getNext() method?

JPype has the feature to give you access to bean properties (get-Methods without a parameter) using just the property name. So if you have a class with a method getNext() you can access that bean property from within python using instance.next which is nice in 99,9% of the cases. But how can I access the instance.next()? If I call instance.next() I'll get an exception saying that the return type of the bean property is not callable.


Solution

  • It is fixed in originell's jpype fork https://github.com/originell/jpype/commit/0e6067f2eec78f6c697b3714f467142fa9b58243