what are the limitations of jython's PyObject.__tojava__ method?
Question
Jython's PyObject provides a method to cast a python object to java. There are some old articles on Jython Monthly describing the use of __tojava__
to create a jython object factory
Besides the need for an interface, are there any other limitations to using Jython to create "java" objects.
Solution
Jython objects won't play well with javas serialization system and there used to be serious problems with introspection. I have not yet tested the introspection issues in the latest jython releases, so this might be an outdated issue. But other than these minor things, in my experience everything else works well.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow