Thanks. I was missing the call to resolve.
(let [klass (resolve c)]
)
With it it works.
Razvan
On Dec 8, 11:39 pm, Stuart Sierra wrote:
> Not sure if it helps, but here's my example of using reflection in a macro:
>
> http://stuartsierra.com/2010/12/16/single-abstract-method-macro
>
> -S
Not sure if it helps, but here's my example of using reflection in a macro:
http://stuartsierra.com/2010/12/16/single-abstract-method-macro
-S
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.
you can use all the things can use outside of macros:
resolve
Class/forName
etc
On Thu, Dec 8, 2011 at 1:06 PM, Razvan Rotaru wrote:
> Hi,
>
> I'm trying to write some macros for java object instanciation. Here's
> the code:
>
>
> (defn- gen-object-method [my-class id option value]
> (le
Hi,
I'm trying to write some macros for java object instanciation. Here's
the code:
(defn- gen-object-method [my-class id option value]
(let [method (some (java-methods option) (map #(.getName %)
(.getMethods my-class)))]
(when (not method)
(throw (new java.lang.Illega