I'm using a Java library from Clojure. The library cookbook describes a static method that is used as follows:
List<String> myList = new ArrayList<String>();
// next, add values to list, then:
myResults = JavaClass.staticMethod(myList);
Initially, I thought I would be able to use the method from Clojure by doing the following:
(-> ["vector" "of" "strings"]
java.util.ArrayList.
JavaClass/staticMethod)
But when I do this I get the error message "CompilerException java.lang.IllegalArgumentException: No matching method: staticMethod".
The only thing I can see that I'm doing wrong is that in the cookbook example, the ArrayList is being declared as type List, and although ArrayList implements the List interface I'm not explicitly doing that in the Clojure code. My Java-fu is not that strong, so am I correctly understanding how method signatures work in Java?
EDIT: As one of the answers below alludes to, the method is variadic. It has the form
public static List<String> staticMethod(List<String> args, Object... moreArgs) {
...
}