[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] args() evaluation and around advice interaction
|
Hello
I have come across a puzzling behavior of aspectJ
1.1.1. Was surprised to find out that aspectJ 1.1.1
has no provision to advice a mix of around and
before/after advice, all defined to have same
parameter types.
More specifically, in the following sample, inside the
"other_aspect", if we replace args(x, y, ..) with
(just) an args(x, y), the around advice in
"some_aspect" escapes interception. The
(invisible/implicit) AroundClosure parameter of an
around advice seems to come in the way of args()
matching. Is this the documented
behavior? If it so, isn't it somewhat annoying?
-------------------------------------------------------
aspect some_aspect {
pointcut call_m(int a, int b) :
call(int test.m(..)) && args(a, b);
before(int x, int y) : call_m(x, y) { ... }
int around(int x, int y) : call_m(x, y) { ... }
}
aspect other_aspect {
before(int x, int y) :
adviceexecution() && within(some_aspect) &&
args(x, y, ..){
...
}
}
-------------------------------------------------------
Thanks
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25ยข
http://photos.yahoo.com/ph/print_splash