Back
typename (clj)
(source)protocol
(typename o)
Returns Java name as returned by ASM getClassName, e.g. byte[], java.lang.String[]
Examples
jonasseglare/geex
(ns geex.core.datatypes-test
(:require [geex.core.datatypes :refer :all]
[clojure.test :refer :all]
[clojure.set :as cljset]
[clojure.reflect :as r]
[bluebell.utils.wip.core :as utils]))
(deftest typename-test
(is (= "double[][]"
(r/typename (class (into-array [(double-array [])])))))
#_(do
(is (= (typename (class (double-array [])))
"double[]"))
(is (= (typename (class 9))
"java.lang.Long"))
(is (= (typename Long/TYPE)
"long"))))
reborg/clojure-essential-reference
(require 'clojure.reflect)
(dir clojure.reflect) ; <1>
;; ->AsmReflector
;; ->Constructor
;; ->Field
;; ->JavaReflector
;; ->Method
;; ClassResolver
;; Reflector
;; TypeReference
;; do-reflect
;; flag-descriptors
;; map->Constructor
;; map->Field
;; map->Method
;; reflect
;; resolve-class
;; type-reflect
;; typename