[CLJ-982] Implement an interface? predicate to balance class? Created: 04/May/12 Updated: 09/Jun/12 Resolved: 08/Jun/12
|Affects Version/s:||Release 1.5|
|Labels:||enhancement, patch, test|
|Patch:||Code and Test|
clojure.core implements a class? predicate to detect if a thing is an instance of java.lang.Class. The attached patch implements interface? to further distinguish classes that are also interfaces. This gives us Clojure api for e.g., enumerating all interfaces a thing's base class implements; as in, (filter #(interface? %) (supers (class my-thing))).
|Comment by Stuart Halloway [ 08/Jun/12 12:28 PM ]|
I would prefer to see this, and other interop/reflective items, in a separate contrib lib.
|Comment by David Rupp [ 09/Jun/12 9:08 AM ]|
Thanks for the feedback, Stu. Is there an existing contrib lib for stuff like this? Or should I create one?