MCPcopy Index your code
hub / github.com/clojure/clojure / addMethod

Method addMethod

src/jvm/clojure/lang/MultiFn.java:58–68  ·  view source on GitHub ↗
(Object dispatchVal, IFn method)

Source from the content-addressed store, hash-verified

56}
57
58public MultiFn addMethod(Object dispatchVal, IFn method) {
59 rw.writeLock().lock();
60 try{
61 methodTable = getMethodTable().assoc(dispatchVal, method);
62 resetCache();
63 return this;
64 }
65 finally {
66 rw.writeLock().unlock();
67 }
68}
69
70public MultiFn removeMethod(Object dispatchVal) {
71 rw.writeLock().lock();

Callers

nothing calls this directly

Calls 4

getMethodTableMethod · 0.95
resetCacheMethod · 0.95
lockMethod · 0.80
assocMethod · 0.65

Tested by

no test coverage detected