Function: cider-who-implements
cider-who-implements is an autoloaded, interactive and byte-compiled
function defined in cider-xref-tree.el.
Signature
(cider-who-implements &optional SYMBOL)
Documentation
Browse the implementations of the protocol or multimethod SYMBOL.
For a protocol, lists the types that implement it; for a multimethod, lists its dispatch values - on an expandable tree.
With cider-nrepl's cider/who-implements op this includes inline
defrecord/deftype implementers and jumps to each implementation's source.
Without it, a client-side fallback lists extend-style targets and dispatch
values only. Clojure-on-the-JVM only.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-tree.el
;;;###autoload
(defun cider-who-implements (&optional symbol)
"Browse the implementations of the protocol or multimethod SYMBOL.
For a protocol, lists the types that implement it; for a multimethod, lists its
dispatch values - on an expandable tree.
With cider-nrepl's `cider/who-implements' op this includes inline
`defrecord'/`deftype' implementers and jumps to each implementation's source.
Without it, a client-side fallback lists `extend'-style targets and dispatch
values only. Clojure-on-the-JVM only."
(interactive)
(cider-ensure-session)
(let* ((symbol (or symbol (cider-symbol-at-point)
(read-string "Implementations of: ")))
(info (or (cider-var-info symbol)
(user-error "%s" (cider-resolution-failure-message symbol))))
(var (concat (nrepl-dict-get info "ns") "/" (nrepl-dict-get info "name")))
(plan (if (cider-nrepl-op-supported-p "cider/who-implements")
(cider-xref-tree--implements-op-plan var)
(cider-xref-tree--implements-eval-plan var))))
(pcase (plist-get plan :kind)
('nil (user-error "Couldn't introspect %s; is its namespace loaded?" var))
("other" (user-error "%s is not a protocol or multimethod" var))
(_ (cider-xref-tree--show-implements var plan)))))