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]

Reflection


Hello fellow Kawa programmers!

I'm trying to reflect on Classes, however, I'm running into some
problems:

> ("foo":getClass)
class java.lang.String
> (("foo":getClass):getCanonicalName)
; Evaluation aborted on java.lang.RuntimeException: no applicable method named `getCanonicalName' in java.lang.String.
> (java.lang.String:getCanonicalName)
; Evaluation aborted on java.lang.RuntimeException: no such field getCanonicalName in java.lang.String.
> (<java.lang.String>:getCanonicalName)
; Evaluation aborted on java.lang.RuntimeException: no such field getCanonicalName in java.lang.String.


How do I correctly use reflection (for finding methods and fields etc.)?

Thanks for any help!

Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]