You're viewing version 1.2.0 of -cache-protocol-fn. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16



  • (-cache-protocol-fn pf x c interf)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core_deftype.clj:463 top

(defn -cache-protocol-fn [^clojure.lang.AFunction pf x ^Class c ^clojure.lang.IFn interf]
  (let [cache  (.__methodImplCache pf)
        f (if (.isInstance c x)
            (find-protocol-method (.protocol cache) (.methodk cache) x))]
    (when-not f
      (throw (IllegalArgumentException. (str "No implementation of method: " (.methodk cache) 
                                             " of protocol: " (:var (.protocol cache)) 
                                             " found for class: " (if (nil? x) "nil" (.getName (class x)))))))
    (set! (.__methodImplCache pf) (expand-method-impl-cache cache (class x) f))
Vars in clojure.core/-cache-protocol-fn: class defn let nil? str when-not
Used in 0 other vars

Comments top

No comments for -cache-protocol-fn. Log in to add a comment.