Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Pointcut advice within advice of another pointcut

Hi,

I have a question regarding calling one advice from within another:

Conceptually my program is working like this:

boolean varA = methodA();

if (varA == true)
{
 methodB();
 }

else ;


I am trying to prevent execution of methodB() and run another method instead.

I have a pointcutA defined which captures the boolean value of varA
and another pointcutB which captures execution of methodB().

Ideally I want to call the advice for pointcutB whenever pointcutA is captured.

I am not sure if this is the right/feasible approach for doing this
and would appreciate your advice in this regards on how to approach
the problem.

Thanks,

Sarthak


Back to the top