Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Using reflection to access join point...

Yes, this is it.

Thanks a lot,
Nemanja.


Wes Isberg wrote:

With proceed(..), you don't need to worry about the actual arguments of the join point, only the declared arguments of your advice. So just leave the advice parameters out, since you are not binding args:

--------
Object around( ) :  // no args here
cachedOperations() { Object[] arguments = thisJoinPoint.getArgs();
   // ...
return proceed(); // so no args here }
--------

(I believe) the arg array is copied, so you won't affect the array itself,
but if you mutate an argument, the mutation should be visible to anything that runs after the proceed(). See the programming guide documentation for proceed(..), around advice, and binding join point context.

HTH - Wes



Back to the top