This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
2008/3/1, Jim White wrote:
So I fiddled around and suggest this:
#|kawa:9|# (java.lang.Class:isArray (integer[] 1 2):class) true #|kawa:10|# (java.lang.Class:getComponentType (integer[] 1 2):class) class gnu.math.IntNum
Dealing with primitive types is a bit fussier:
#|kawa:24|# (instance? (java.lang.Class:getComponentType (int[] 1 2):class) <java.lang.Class>) true #|kawa:25|# (java.lang.Class:getComponentType (int[] 1 2):class) int #|kawa:26|# (instance? (java.lang.Class:getComponentType (int[] 1 2):class) <java.lang.Class>) true #|kawa:27|# (java.lang.Class:isPrimitive (java.lang.Class:getComponentType (int[] 1 2):class)) true #|kawa:29|# (eq? (java.lang.Class:getComponentType (int[] 1 2):class) java.lang.Integer:TYPE) #t
Oops, I not guessed use the 'native' methods:
#|kawa:24|# (*:getMethods java.lang.Class) ... public native java.lang.Class java.lang.Class.getComponentType() ...
as static. Many-many thansk!
Did it work?
Yes! But... very slowly. Especially startup (initialization).
If have trouble and/or success please do let me know on the IFCX forum.
I wrote: http://sourceforge.net/forum/message.php?msg_id=4573444 :)
... What you think about JavaFX?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |