On Feb 26, 1:05 am, Mark Derricutt <m...@talios.com> wrote:
> Personally I'd probably find adding annotations at the method level more
> useful than at the gen-class level.  Although both would certainly be handy.
>
> Some examples I'm thinking of would be adding say the spring @Component
> annotation to a class, so that the instance could be autowired into other
> classes.  Another example would be a small AOP style framework we have at
> work, where I'd add an @AfterAdvice annotation against a method.
>
> I'm not even sure what a good syntax would be (I've yet to give that any
> thought)..

It would certainly be nice if gen-class had some hooks as extension
points (pre-visit-class, pre-visit-method, post-visit-method, post-
visit-class or something like that) that would allow user functions to
be called. Right now, gen-class seems to be pretty monolithic and has
to be reimplemented completely if one has special needs (it's also
quite probable that I'm just too stupid to see how it can be extended
easily).

I know that the addition of these hooks would increase the complexity
of gen-class' already complex API even further and that they would
allow completely useless bytecode to be generated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to