[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] CFlow semantic and help
|
Hi Valerio,
The boolean expression used in the if pointcut can (to quote the quick
reference):
"... only access static members, variables bound in the same pointcut,
and thisJoinPoint forms."
In your case the use of aspectOf() should do the trick.
after(): a() && if(aspectOf().state==State.initial) {
this.state = State.matchedA;
}
after(): b() && if(aspectOf().state==State.matchedA) {
this.state = State.matchedB; // <<< must be B
}
after(): c() && if(aspectOf().state==State.matchedB) {
this.state = State.matchedC; // <<< must be C
}
On 7-Mar-05, at 2:24 AM, Valerio Schiavoni wrote:
Eric Bodden ha scritto:
after(): b() && if(this.state==State.matchedA) {
this.state = State.matchedB; // <<< must be B
}
after(): c() && if(this.state==State.matchedB) {
this.state = State.matchedC; // <<< must be C
}
i tried your solution in eclipse, but i can't compile it.
i get: "Cannot make a static reference to the non-static field state"
any idea ?
i'm using eclipse, ajdt tools, eclipse 3.1M5a.
thanks, Valerio
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users