agou (7) [Avatar] Offline
#1
Hello. My question is the following:
Is it possible to define a pointcut that captures join points that are only inside classes and not insides aspects?
For example the following pointcut captures public methods. But i don't want to capture public methods inside aspects. Is that possible?


pointcut publicMethodsPC() : execution(public * *.*(..));
ramnivas (171) [Avatar] Offline
#2
Re: Question about join points inside classes
Not really, unless you follow some naming convention such as aspects end with "Aspect" in their name and then using !within(*Aspect) as the pattern.

With AspectJ 5 in Java 5 environment, you may use annotations in a similar manner.

-Ramnivas