[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] dont follow method calls within aspect
|
Thx for the advice, works also and i didnt have to use the "&& wihtin"
clause.
I thought i had already tried this out, but somehow i must have mixed
it up with another error.
By the way, do i miss sth if i leave out the "&& wihtin" clause?
If you leave out the "&& within(MyAspect)" you will exclude join points
that occur within the control flow of advice defined in ANY aspect. The
&& within() limits the scope of the pointcut.
Does that make sense, or do you need further clarification?
Nicholas Lesiecki
Software Craftsman, specializing in J2EE,
Agile Methods, and aspect-oriented programming
m: 520 591-1849
Books:
* Mastering AspectJ: http://tinyurl.com/66vf
* Java Tools for Extreme Programming: http://tinyurl.com/66vt
Articles on AspectJ:
* http://tinyurl.com/66vu and http://tinyurl.com/66vv
On Dec 22, 2004, at 1:36 AM, sirrurg wrote:
Nicholas Lesiecki wrote:
does !cflow(adviceexecution() && within(MyAspect)) work?
Nicholas Lesiecki
Software Craftsman, specializing in J2EE,
Agile Methods, and aspect-oriented programming
m: 520 591-1849
Books:
* Mastering AspectJ: http://tinyurl.com/66vf
* Java Tools for Extreme Programming: http://tinyurl.com/66vt
Articles on AspectJ:
* http://tinyurl.com/66vu and http://tinyurl.com/66vv
On Dec 20, 2004, at 6:02 AM, sirrurg wrote:
Hi all,
im currently trying to log some method executions and have pointcuts
looking like
pointcut PubMethodCall(Point p) : execution(public * *(..)) &&
target(p);
and my advice looks like
before(Point p): PubMehtodCall(p) &&
!cflowbelow(PubMethodCall(Point){....}
At the moment i am using a private method within the aspect to
create an proper output,
by reading the parameters from the method call an parsing into a
String,
if the parameters are Objects and they dont have a toString()-method
i
try to create some kind of output by accesing it through
getter-Methods if i find some.
Now my Question, if i call sth like Point.equals(Point p) and Point
has no toString() method,
in this case i get some extra "log-output" for the calls to the
parameter p.
Is there any possiblity to stop this?
Sincerely
Sirrurg
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
Thx for the advice, works also and i didnt have to use the "&& wihtin"
clause.
I thought i had already tried this out, but somehow i must have mixed
it up with another error.
By the way, do i miss sth if i leave out the "&& wihtin" clause?
Sincerely
Sirrurg
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users