(defn class-methods [x]
(let [c (if (class? x) x (class x))]
(distinct (sort (seq
(map #(.getName %1)
(.getMethods c)))))))
(println (let [x (new Integer 1)] (class-methods x)))
Tail error logs to slack for fun and profit
9 years ago
Very useful, thanks!
ReplyDeleteHi there! glad to drop by your page and found these very interesting and informative stuff. Thanks for sharing, keep it up!
ReplyDeleteI appreciate the code snippet demonstrating how to introspect methods in Clojure.
ReplyDelete