• (class-matcher & classes)
Creates a tester than whitelists a Java class.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source net/licenser/sandbox/matcher.clj:23 top

(defn class-matcher
  "Creates a tester than whitelists a Java class."
  [& classes]
  (dorun (map #(if (= % Object) (throw (RuntimeException. "You silly wabbit have 'Object' in a class matcher. This will make /every/ object pass the tester so defeats the prupose of the matcher, I don't let you do that since I'm evelish! Also Rayne made me hunt this for a whole night untill he noted 'oh perhaps it is cause I use Object'... Meh!"))) classes))
  (fn [form]
    (if (= (type form) java.lang.Class)
      (map (partial isa? form) classes)
Vars in net.licenser.sandbox.matcher/class-matcher: = defn dorun fn isa? map partial type
Used in 0 other vars

Comments top

No comments for class-matcher. Log in to add a comment.