On Sep 21, 11:22 pm, sross <ros...@gmail.com> wrote:
>  I'm looking for a bit of advice for calling a java method which has a
> few different signatures (such as Connection.prepareStatement).
>  Is there a cleaner way of passing a variable number of arguments to
> the method, such as
>
> (apply (memfn prepareStatement) (sql/connection) args)

Java's vararg-methods accept an array of Objects; try if this works:
(.prepareStatement (sql/connection) sql (into-array Object [arg1 arg2
arg3])

It's not really much nicer than the apply version, though.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to