On Sep 21, 11:35 pm, pmf <phil.fr...@gmx.de> wrote:
> 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])


Yes. Unfortunately prepareStatement isn't a varargs method but 3
methods with
differing signatures so this approach cannot be used here.



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