(implements? {:keys [impls] :as protocol} type)
(implements? protocol type method)
checks whether a type has implemented a protocol
(implements? state/IStateGet clojure.lang.Atom) => true
(implements? state/IStateGet clojure.lang.Atom "-get-state") => true
checks whether a type has implemented a protocol (implements? state/IStateGet clojure.lang.Atom) => true (implements? state/IStateGet clojure.lang.Atom "-get-state") => true
(protocol-impls protocol)
returns types that implement the protocol
(protocol-impls state/IStateSet) => (contains [clojure.lang.Agent clojure.lang.Ref clojure.lang.IAtom clojure.lang.Volatile clojure.lang.IPending clojure.lang.Var] :in-any-order :gaps-ok)
(protocol-impls state/IStateGet) => (contains [clojure.lang.IDeref clojure.lang.IPending] :in-any-order :gaps-ok)
returns types that implement the protocol (protocol-impls state/IStateSet) => (contains [clojure.lang.Agent clojure.lang.Ref clojure.lang.IAtom clojure.lang.Volatile clojure.lang.IPending clojure.lang.Var] :in-any-order :gaps-ok) (protocol-impls state/IStateGet) => (contains [clojure.lang.IDeref clojure.lang.IPending] :in-any-order :gaps-ok)
(protocol-interface protocol)
returns the java interface for a given protocol
(protocol-interface state/IStateGet) => hara.protocol.state.IStateGet
returns the java interface for a given protocol (protocol-interface state/IStateGet) => hara.protocol.state.IStateGet
(protocol-methods protocol)
returns the methods provided by the protocol
(protocol-methods state/IStateSet) => '[-clone-state -empty-state -set-state -update-state]
returns the methods provided by the protocol (protocol-methods state/IStateSet) => '[-clone-state -empty-state -set-state -update-state]
(protocol-remove protocol atype)
removes a protocol
(defprotocol -A- (-dostuff [_]))
(do (extend-protocol -A- String (-dostuff [_]))
(implements? -A- String "-dostuff"))
=> true
(do (protocol-remove -A- String) (implements? -A- String "-dostuff")) => false
removes a protocol (defprotocol -A- (-dostuff [_])) (do (extend-protocol -A- String (-dostuff [_])) (implements? -A- String "-dostuff")) => true (do (protocol-remove -A- String) (implements? -A- String "-dostuff")) => false
(protocol-signatures protocol)
returns the method signatures provided by the protocol
(protocol-signatures state/IStateSet) => '{-update-state {:arglists ([obj f args opts]) :doc nil} -set-state {:arglists ([obj v opts]) :doc nil} -empty-state {:arglists ([obj opts]) :doc nil} -clone-state {:arglists ([obj opts]) :doc nil}}
returns the method signatures provided by the protocol (protocol-signatures state/IStateSet) => '{-update-state {:arglists ([obj f args opts]) :doc nil} -set-state {:arglists ([obj v opts]) :doc nil} -empty-state {:arglists ([obj opts]) :doc nil} -clone-state {:arglists ([obj opts]) :doc nil}}
(protocol? obj)
checks whether an object is a protocol
(protocol? state/IStateGet) => true
checks whether an object is a protocol (protocol? state/IStateGet) => true
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close