Thanks for the help and clarifications. My problem is that I'm working on a tool, as a part of my thesis, to randomly execute annotated java classes to try discover its behavior. So if a class has a (b|B)oolean field and I read its value using reflection it returns (using Field.get()) a Boolean that for clojure will be always false. In order to solve this issue I created the follow fn: (defn- get-val [^java.lang.reflect.Field f instance] (let [value (.get f instance)] (if (instance? java.lang.Boolean value) (boolean value) value))) Thanks and regards, -- Bauna On 10/06/2013 10:57 PM, Andy Fingerhut
wrote:
-- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. |
- boolean java interopt puzzle/bug?! Pablo Nussembaum
- Re: boolean java interopt puzzle/bug?! Gary Trakhman
- Re: boolean java interopt puzzle/bug?! Rob Browning
- Re: boolean java interopt puzzle/bug?! Andy Fingerhut
- Re: boolean java interopt puzzle/bug?! Pablo Nussembaum
- Re: boolean java interopt puzzle/bu... John D. Hume