--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can't define multiple fields that can be directed accessed from Java, but you can define accessors for data you store in other ways. gen-class gives you only a single variable that's specific to each instance of the class, but you can e.g. put a map in it, with atoms as values if you need mutability, and define the accessors to access those.
(If you have a lot of variables that you're handling that way, you may want to write a gen-class-generating macro. That's what I did, but it's not general; it's tailored to my application.)