Issue614598

classification
Title: __tojava__() in PyJavaInstance
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: bckfnn, otmarhumbel
Priority: normal Keywords: patch

Created on 2002-09-25.20:04:00 by otmarhumbel, last changed 2002-10-29.14:43:11 by otmarhumbel.

Messages
msg2252 (view) Author: Oti Humbel (otmarhumbel) Date: 2002-09-25.20:04:00
Because a PyJavaInstance knows about its java 
counterpart, i suggest adding the following convenience 
method:

  public Object __tojava__() {
    return super.__tojava__( __class__.proxyClass );
  }

to PyJavaInstance.java.

Example usage: 
In an embedding situation where you don't know what 
eval() will return, it would be nice if a PyJavaInstance 
result simply could be turned into a java object.

Many thanks, and best wishes,
Oti.
msg2253 (view) Author: Finn Bock (bckfnn) Date: 2002-10-29.12:15:30
Logged In: YES 
user_id=4201

I'll reject this patch because you can the proxy instance by
calling  the method 

  __tojava__(Object.class) 

on the instance. If a convinience method should be added at
all, it must be added to PyObject as well.
msg2254 (view) Author: Oti Humbel (otmarhumbel) Date: 2002-10-29.14:43:11
Logged In: YES 
user_id=105844

Thank you for the response !
The Object.class trick is cool - nonetheless I wouldn't have a 
problem if you added a convenience method to PyObject.
History
Date User Action Args
2002-09-25 20:04:00otmarhumbelcreate