चूंकि जावा varargs actually arrays हैं, तो आप एक सरणी पास करके क्लोजर में vararg फ़ंक्शन को कॉल कर सकते हैं।
आप एक Clojure seq परिवर्तित कर सकते हैं एक सरणी में (शायद चर तर्क कार्यों के Clojure की विविधता का उपयोग करके):
(TestClass/aStaticFunction (into-array Integer [(int 1),(int 2)]))
या
(defn a-static-function-wrapper [& args]
(TestClass/aStaticFunction (into-array Integer args))
या एक सरणी बनाने के लिए और अपने सूचकांक मैन्युअल रूप से सेट
(TestClass/aStaticFunction (doto (make-array Integer 3)
(aset 0 first-element)
(aset 1 second-element)
(aset 2 third-element)))
स्रोत
2012-07-28 15:28:16
संभव डुप्लिकेट http://stackoverflow.com/questions/9103777/implement-a-java-interface-method-with-a -वर्तनीय-संख्या-का-तर्क-इन-क्लोजर) – Jeremy