Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] why this cflow put counters in aspect itself?

Well, by stating !within(mypackage..*) you state that the joinpoint you
are interested in is not in your aspect package. This however must not
have any implications on the cflow pointcut and its update-shadow. If
you want to restrict this, you can change it to:

cflow(!within(mypackage..*) && call(* *(..)))

Eric 

> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-
> bounces@xxxxxxxxxxx] On Behalf Of Gu Dake
> Sent: Wednesday, June 21, 2006 8:45 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] why this cflow put counters in aspect itself?
> 
> package mypackage;
> 
> aspect MyAspect {
> 
>     pointcut singleStep(): !within(mypackage..*) && cflow(call(*
> *(..))) && !execution(* *(..));
> 
> before(): singleStep() {
>     System.out.println(thisJoinPointStaticPart);
> }
> }
> 
> This aspect works fine at runtime.  But when I opened the
> MyAspect.class in decompile tool, I saw some instrumented
> ajc$cflowCounter$0.inc() around my println()
> 
> 



Back to the top