there doesn't seem to be a java.long.Class.toString(int) method.  i still have no idea what method jython is calling.
 
class ClassTest {
    public static void main(String[] args) {
        System.out.println(java.lang.Class.toString(10));
    }
}
 
C:\>javac ClassTest.java
ClassTest.java:3: cannot resolve symbol
symbol  : method toString (int)
location: class java.lang.Class
        System.out.println(java.lang.Class.toString(10));
                                          ^
1 error
 
 
 
 
 
 
 
-----Original Message-----
From: jython-users-admin@lists.sourceforge.net [mailto:jython-users-admin@lists.sourceforge.net] On Behalf Of Jeff Emanuel
Sent: Wednesday, September 29, 2004 9:55 AM
To: Bryan Weingarten; jython-users@lists.sourceforge.net
Subject: RE: [Jython-users] toString

 
It's probably being resolved as java.lang.Class.toString.
java.lang.Class.toString(10) return '10'.  MyClass is an
instance of Class.
-----Original Message-----
From: jython-users-admin@lists.sourceforge.net [mailto:jython-users-admin@lists.sourceforge.net] On Behalf Of Bryan Weingarten
Sent: Wednesday, September 29, 2004 9:25 AM
To: jython-users@lists.sourceforge.net
Subject: [Jython-users] toString

i saw  a faq on the internet about this issue, but i still don't understand it, so i hope someone here can explain it to me.  i'm calling a class that has a static method
 
class MyClass {
    public String toString(int) {
    }
}
 
i'm unable to call this method from jython using the direct normal  method.
 
s = mypackage.MyClass.toString(10)
 
when i do call this method, it prints out the string '10' instead of the string of returned my MyClass.toString.  the faq i read said something about jython prefering to call instance methods which the Class object has.  but the Class object doesn't have a toString method that takes an int parameter, so i'm confused about this.  the int value was passed into some method, but which one?  i know there is a workaround to this by getting the toString attribute from MyCLass explicitly then invoking the method, but i was curious what exactly is going on here.
 
thanks,
 
bryan