Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Q about "adviceexecution" and "declare error"

Thanks, Ramnivas,

I was under the mistaken impression that adviceexecution works something like a "withincode" or "cflow", which of course it doesn't.

dean

Ramnivas Laddad wrote:
Dean,

Since adviceexecution() will match an advice join point and criticalSectionPCD() will match a non-advice join point (in your case, I presume you are selecting execution() or call() join point), combining the corresponding pointcuts using && will match nothing.

-Ramnivas

On 2/20/07, Dean Wampler <dean@xxxxxxxxxxxxxxxxxxxxx> wrote:
I'm working on idioms for defining PCDs that a class developer can use to exclude join points from possible advices. For example, say I want a 'critical section' to never be advised.

What I've tried is something like the following:

declare error: criticalSectionPCD() && adviceexecution(): "Can't advise the critical section."

This compiles fine, but it has no effect. (I defined another aspect that breaks the rule.)

Suggestions?

dean



Back to the top