Hi,
Is there any way to generate class in runtime and then use it?
How far I can only generate interfaces.
This works:
(do
(gen-interface :name test.commons.Me
:methods [[ me [ String ] void ]])
(def z (reify test.commons.Me
(me [t z] (println "hello world" z))))
(.me z "wowo")
)
That doesn't:
(do
(gen-class :name test.commons.Mee
:state sema
:methods [
[ me2 [ String ] void ]]
:prefix "mee-"
)
(defn mee-me2[ this a ]
(println "hello" a "had state" (.sema this)))
(.me2 (test.commons.Mee. ) "world")
)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en