Issue1217340

classification
Title: Specify signatures for java methods
Type: rfe Severity: normal
Components: Jythonc compiler Versions:
Milestone:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amak, bzimmer, fwierzbicki, lycotic
Priority: low Keywords: patch

Created on 2005-06-09.02:12:26 by lycotic, last changed 2012-03-19.21:33:48 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
sig1.patch lycotic, 2005-06-09.02:12:26 signature patch
Messages
msg2447 (view) Author: Randy Brown (lycotic) Date: 2005-06-09.02:12:26
This patch allows the programmer to specify the
signatures of generated proxy methods of classes in
jython.  For example (from the test):

>>> class Bar(java.lang.Object):
...  def __init__(self, key):
...    self.message = 'hello!'
...    self.key = key
...  def hello(self):
...    self.message = 'hi'
...  def storeObj(self, something):
...    self.obj = something
...  def sum(self, a, b):
...    return a+b
...  sum.sig = ('i', ['i', 'i'])
...  def storeMe(self, str):
...    self.message = str
...  storeMe.sig = (None, [java.lang.String])

winds up with something like:

public class Bar extends Object {
  // constructors still the same

  public Object hello() {...}
  public Object storeObj(Object something) {...}
  public int sum(int a, int b) {...}
  public void storeMe(String str) {...}
}
msg6886 (view) Author: Alan Kennedy (amak) Date: 2012-03-19.21:27:39
The patch in this issue is 7 years old: does it even still apply cleanly to the code base?

Also, re-assigning to nobody, bzimmer doesn't contribute to jython anymore.
msg6887 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-03-19.21:33:48
This is interesting, but not the approach we would take today (we'd surely use some sort of decorator approach like the stalled clamp project). I'll close this.
History
Date User Action Args
2012-03-19 21:33:48fwierzbickisetstatus: open -> closed
resolution: out of date
messages: + msg6887
nosy: + fwierzbicki
2012-03-19 21:27:39amaksetassignee: bzimmer ->
messages: + msg6886
nosy: + amak
2009-03-12 08:07:45zyasoftsetpriority: normal -> low
2009-03-12 08:00:40zyasoftsettype: rfe
components: + Jythonc compiler, - Core
2008-12-14 17:46:04fwierzbickisetcomponents: + Core, - None
2005-06-09 02:12:26lycoticcreate