Jython class factory?

David Charles <[email protected]> Tue, 20 Sep 2016 22:34:35 -0700
Newsgroups gmane.comp.lang.jython.user
Message-ID <CAJHoYyKsuZ2D=s+orh+QcFb1cbg_-F8Sw-qCSgS1jzMYsomcNw@mail.gmail.com>
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.

Thanks,
David

------------------------------------------------------------------------------

_______________________________________________
Jython-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-users