type | since v1.7.10 | clojure.lang/Namespace | Edit |
(Namespace. obj name)
(deftype Namespace [obj name]
Object
(findInternedVar [this sym]
(let [k (munge (str sym))]
(when ^boolean (gobject/containsKey obj k)
(let [var-sym (symbol (str name) (str sym))
var-meta {:ns this}]
(Var. (ns-lookup obj k) var-sym var-meta)))))
(getName [_] name)
(toString [_]
(str name))
IEquiv
(-equiv [_ other]
(if (instance? Namespace other)
(= name (.-name other))
false))
IHash
(-hash [_]
(hash name)))