[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] getting my feet wet
|
The important thing to remember is that call join points "happen at"
the method call site. Here the method calls are happening in code that
may very well be outside of AspectJ's control (Groovy generated
bytecode and reflection). I'm pleasantly surprised that Groovy works.
An approach that may work for you is to use execution() and this()
instead. Excecution join points "happen in" code that AspectJ does
control. If they work for you, that's the easiest solution.
Cheers,
Nick
On May 17, 2004, at 10:37 PM, Tom Eugelink wrote:
Well, my first tries using AOP in the form of AspectJ. Got the idea
and doing, erm, security. So I've writen a pointcut that wil catch all
getters and now am trying to write one that will catch all setters and
that is where my problem arises. If I simplify the pointcross to:
before(Issue s): target(s) && call(public * *(..))
{
System.err.println("!!!!!!!!!!!!!!! " + thisJoinPoint);
}
I do get catches of the getters:
!!!!!!!!!!!!!!! call(Securitylevel
org.tbee.bugger.entities.Issue.getSecuritylevel())
But setters (which I know are executed also because I added a print
there also) are not caught.
Both the getters and setters are called through reflection, although
the getters are done with groovy (which is bytecode generation) and
the setters via reflection pur-sang. Never the less they both are
public methods in the same class.
Any suggestions?
Tom
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users