Hi, On Jun 2, 2:51 am, Mark Rathwell <[email protected]> wrote:
> ;; can do it with eval, but what is the correct way? > user=> (eval `(ConnectionConfiguration. ~...@params)) > (eval `(ConnectionConfiguration. ~...@params)) > #<ConnectionConfiguration > org.jivesoftware.smack.connectionconfigurat...@a0430b6> The best way is to use reflection. Calls to a constructor are hard-wired in the JVM bytecode, AFAIU. So you have to know the arguments. If you *don't* know the arguments at compile time, you have to lookup and call the correct constructor at runtime via reflection. Sincerely Meikel -- 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
