Quantcast

Jython class factory?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jython class factory?

David Charles

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Loading...