Hi Miki,
The JavaBeans spec defines the notion of a getter, and exposes it
reflectively through java.beans.PropertyDescriptor. This matters
because not all "getXXX" methods are getters, and not all getters have
names "getXXX". The Clojure bean function uses beans reflection, you
should take a look at it.
An interesting improvement would be exception-proofing. Some beans are
poorly-behaved (IMO) in the sense that their getters can throw
exceptions.
Cheers,
Stu
Hello All,
I wrote a little utility that "wraps" Java object into a hash map
(coming to think of it, "wrap" is not that good name).
The code is at http://bitbucket.org/tebeka/clojurewise/src/tip/wrap.clj
.
Since I'm a Clojure newbie, I'll be glad to hear any comment about it.
Thank you,
--
Miki
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
[email protected]
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 post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en