Fork me on GitHub
#java
<
2020-07-15
>
jjttjj13:07:36

Is there a built in way in clojure.reflect to get a type string that looks like "L[my.Type" instead of "my.Type[]" (or <>)

jjttjj13:07:59

to get one suitable for use in :tag metadata

jjttjj13:07:57

Alternatively, would the obvious string manipulation be all that's needed to handled all cases of [] there?

seancorfield17:07:36

@jjttjj If you do (.getName (class some-array)) you will get the format you want, i.e., not using clojure.reflect.

jjttjj20:07:42

Thanks that works