On Nov 21, 8:46 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I'd appreciate examples of gen-and-load-class and gen-and-save-class
> use not well supported by the AOT gen-class.
Don't know if this is supported now not, but here's my old
gen_classes.clj:
(defmacro defclass [name & args]
`(do
(println ~(str "Generating " name))
(gen-and-save-class *dir* ~name [EMAIL PROTECTED])))
(defmacro defmapreduce [name]
`(defclass ~name
:extends org.apache.hadoop.mapred.MapReduceBase
:implements [org.apache.hadoop.mapred.Mapper
org.apache.hadoop.mapred.Reducer]))
(defmapreduce "org.altlaw.func.ohm1.GroupFiles")
(defmapreduce "org.altlaw.func.ohm1.AssignIds")
(defmapreduce "org.altlaw.func.ohm1.ProcessUpdate")
(defmapreduce "org.altlaw.func.pro.Process")
... lots more like that ...
-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---