I've read the excellent answer to Calling clojure from java which shows the new style of calling Clojure from Java.
But the example given just returns a float. How can I return Clojure Vectors and other Sequence types from Clojure to Java? And Maps?
Specifically in this gen-class :
(ns dummy-app.core
(:gen-class
:name com.example.dummy
:methods [#^{:static true} [f [int] int]
#^{:static true} [getVect [] XXXX]
#^{:static true} [getMap [] YYYY]
#^{:static true} [getSeq [] ZZZZ]
] ))
what should I put for XXXX, YYYY and ZZZZ? And what types should they be in my Java program?
Update : in response to Tomo's promising answer, if I try to just use IPersistentVector in the gen-clas I get
Caused by: java.lang.ClassNotFoundException: java.lang.IPersistentVector
when I try to create the Uberjar. I assume there's something else I need to do to import these types?
Update 2 : OK, thanks to more comments from Tomo this seems to work :
(ns dummy-app.core
(import clojure.lang.IPersistentVector)
(:gen-class
:name com.example.dummy
:methods [#^{:static true} [f [int] int]
#^{:static true} [getVect [] clojure.lang.IPersistentVector]
] ))