user=> ((fn [c] (. c (getFields))) Math)
[Ljava.lang.reflect.Field;@770d2e
user=> (. Math (getFields))
clojure.lang.Compiler$CompilerException: REPL:2: No matching method: getFields
at clojure.lang.Compiler.analyzeSeq(Compiler.java:3183)
at clojure.lang.Compiler.analyze(Compiler.java:3125)
at clojure.lang.Compiler.analyze(Compiler.java:3100)
at clojure.lang.Compiler.eval(Compiler.java:3203)
at clojure.lang.Repl.main(Repl.java:63)
Caused by: java.lang.IllegalArgumentException: No matching method: getFields
at clojure.lang.Compiler$StaticMethodExpr.<init>(Compiler.java:1039)
at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:683)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:3176)
... 4 more
Henk
Ahh, tricky. I guess this is similar to how Math.getFields() does not
work, you must do Math.getClass().getFields(). The difference is that
in clojure there is not distinct notation for Math and
Math.getClass(), except that one is handled by a macro and the other
is evaluated.
Thanks for the help,
Henk