Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] writing around advice for an unknown method

Matthew Adams a écrit :

Two things:

1. call(* *(..)) means upon the call to **every** method, not a random one.

2. The sample advice is better written as the following.  (Jean
Louis's example would never execute <stuff after> due to the placement
of his return statement.)
Object around(): <my point cut>
{
<stuff before proceed>
Object returnValue = proceed();
<stuff after>
return returnValue;
}


oops my bad, you are right; my initial sample code certainly doesn't compile, the statements <stuff after>are not reachable..
sorry for the noice




Back to the top