summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clj/clojure/genclass.clj9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/clj/clojure/genclass.clj b/src/clj/clojure/genclass.clj
index 08c0ee94..93fa438e 100644
--- a/src/clj/clojure/genclass.clj
+++ b/src/clj/clojure/genclass.clj
@@ -631,7 +631,14 @@
fully-qualified class name given as a string or symbol
(such as 'java.lang.String)"
[c]
- (Type/getType (the-class c)))
+ (if (or (instance? Class c) (prim->class c))
+ (Type/getType (the-class c))
+ (let [strx (str c)]
+ (Type/getObjectType
+ (.replace (if (some #{\. \[} strx)
+ strx
+ (str "java.lang." strx))
+ "." "/")))))
(defn- generate-interface
[{:keys [name extends methods]}]