I was working with a Java library recently and needed to create a
"Java bean" to pass into it. It can be done via `gen-class` but it
seems kind of verbose having to explicitly write out all of the
getters and setters, and it seems you could also do it via `deftype`
but that's also rather painful (I started looking at that in the hope
of automating it via a macro but it seemed difficult to have
overloaded constructors and I needed both a no-arg constructor and one
that took all the bean attributes).

What do people do when they need a "Java bean" for interop when using
Clojure with a Java library? This seems like it should be common
enough that I would have expected it to be part of clojure.java.data
but it isn't...

Just a class name and a list of property names and (perhaps optional)
types should be all the ceremony we need to write... and I don't want
to reinvent the wheel if that is already out there somewhere?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
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.

Reply via email to