Clojure import java rename

clojure, interop, java

Solution

It's not possible to rename a Java type.

Problem

I was wondering if there is a way of renaming an imported Java Type in clojure. Something like this: ``` (ns foo (:import java.util.List :as JList)) ``` If not; Do I have to then reference the type as FQCN (fully qualified class name)? UPDATE: This example is a bit contrived, I know that I can reference Java classes once imported without FQCN. The real problem is that I have a class that has the same name as a default imported class, for instance in java.lang.

Original source