I am currently using the object-factory technique: I instantiate a Jython object that implements a Java interface and then call __tojava__() and use the retuned object in my Java code.
However, the only thing I do with the object returned from __tojava__() in this case is call getClass(). So, the instantiation step seems wasteful/awkward/misleading. I wonder, is it possible to skip the instantiation step and return a Java *class* rather than a Java *object*?
I tried some things, but this area of Jython is pure magic to me.