'. '

Talk:AOP

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(Comment provided by NicolasDumoulin - via ArticleComments extension)
(Comment provided by btilford - via ArticleComments extension)
Line 10: Line 10:
--NicolasDumoulin 13:00, 13 November 2009 (CET)
--NicolasDumoulin 13:00, 13 November 2009 (CET)
 +
</div>
 +
== btilford said ... ==
 +
 +
<div class='commentBlock'>
 +
AspectJ supports annotations pretty well plus you still have all the old methods of defining a pointcut (or combination) if you need to really specific.
 +
 +
e.g.
 +
@Around("@annotation(com.mycompany.BoundProp)")
 +
 +
would match all methods annotated with @com.mycompany.BoundProp
 +
 +
and you could still say only setters with 1 argument should be bound (since it might make sense to do that)
 +
@Around("@annotation(com.mycompany.BoundProp) && execution(public * *..*.set*(*))")
 +
 +
 +
--btilford 01:45, 19 November 2009 (CET)
</div>
</div>

Revision as of 00:45, 19 November 2009

Comments on AOP <comments />


NicolasDumoulin said ...

We use aspectj for defining and using an aspect that serve an automatic objects caching service. It's not so hard, you can see our notes here: http://www.simexplorer.org/wiki/DevDoc/AspectJ

--NicolasDumoulin 13:00, 13 November 2009 (CET)

btilford said ...

AspectJ supports annotations pretty well plus you still have all the old methods of defining a pointcut (or combination) if you need to really specific.

e.g. @Around("@annotation(com.mycompany.BoundProp)")

would match all methods annotated with @com.mycompany.BoundProp

and you could still say only setters with 1 argument should be bound (since it might make sense to do that) @Around("@annotation(com.mycompany.BoundProp) && execution(public * *..*.set*(*))")


--btilford 01:45, 19 November 2009 (CET)

Personal tools
buy