(defn dot-maker [obj-tester]
(fn dot [object method & args]
(if (obj-tester object method)
(if (instance? java.lang.Class object)
(clojure.lang.Reflector/invokeStaticMethod object method (to-array args))
(clojure.lang.Reflector/invokeInstanceMethod object method (to-array args)))
(throw (SecurityException. (str "Tried to call: " method " on " object " which is not allowed."))))))
Comments top
No comments for dot-maker. Log in to add a comment.