[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #30661] Reflection methods return strange object.
From: |
Per Bothner |
Subject: |
[Bug-kawa] [bug #30661] Reflection methods return strange object. |
Date: |
Sat, 02 Oct 2010 00:41:56 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3 |
Update of bug #30661 (project kawa):
Status: None => Invalid
Assigned to: None => bothner
_______________________________________________________
Follow-up Comment #1:
(Sorry for not answering this sooner.)
This result:
class [Ljava.lang.reflect.Method;
from
(get-class (get-methods 'foo))
is indeed as expected. The result (get-methods 'foo) is an array of
java.lang.reflect.Method instances, so get-class of the resuot is
java.lang.reflect.Method[] *in Java syntax*. However, the toString method of
java.lang.Class uses java.lang.Class#getName for pretty bogus but historical
reasons. Check the JavaDoc for java.lang.Class#getName.
"(get-methods (get-methods 'x))
returns
=> []
invoking getDeclaredMethods should return list of <java.lang.reflect.Method>
objects."
No, it returns a (Java) array of java.lang.reflect.Method objects. And in
this case its an empty array, since the argument array type has no methods
(except those inherited from Object).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30661>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-kawa] [bug #30661] Reflection methods return strange object.,
Per Bothner <=