Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Excluding join points in <clinit> body

Hi,
I want to capture with before() all get, set, call, but to exclude those that happen on the body of the <clinit>s...

 I tried with for set

aspect Foo {
 before() : (set(* *) && !staticinitialization(*)) && !within(Foo) {
   ..
 }
}

but it does not work.. I can prevent sets and gets by saying !static but this not really what I need.. I just want to be able to exclude join points happening in the body of <clinit>

I also tried !withincode, but I cannot express "clinit" as I can specify "new" for constructors... or can I?

Is there a way to do this?

Thanks,

Alex



Back to the top