[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ews.eclipse.technology.aspectj] Re: Per This aspects

Benjamin Mesing wrote:
Hello,

today I've tried to find a solution to get one aspect instance associated
for each instance of a target class (i.e. a 1 to 1 mapping). The only thing
I was able to find was the following:
http://www.aspectprogrammer.org/blogs/adrian/2005/03/perinstance_asp.html

But this looks a little bit complicated. Is there no easier solution? (I do
not really understand how the perthis() and pertarget() stuff in AspectJ
works...).
Wouldn't a "perthis(Classpattern)" be a "nice to have" thing in AspectJ?

Best regards

Benjamin

In AspectJ 5, we've added the pertypewithin(TypePattern) pointcut designator that should do exactly what you need. You can find the details here: http://www.eclipse.org/aspectj/doc/next/adk15notebook/pertypewithin.html


Regards, Adrian.