What is the syntax of type hint for java.util.Map.Entry , a nested static inner class, in Clojure 1.2?
java.util.Map.Entry
I tried both ^Map/Entry and ^Map.Entry , and will not compile.
^Map/Entry
^Map.Entry
Found it!
(ns com.example (:import [java.util Map Map$Entry])) (let [^Map$Entry foo ...])
and for the hint type Object[] :
Object[]
(let [^"[Ljava.lang.Object;" foo ...])
By the way, this syntax is ugly . Is there a better way?
Inner classes refer to the $ sign, so in this case you can refer to it with Clojure as Map$Entry .
$
Map$Entry