[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: How to ask for values of local variables?


>AspectJ doesn't expose local variables as part of a pointcut's context. So
you will want to refactor your code >(e.g., with Extract Method or even
Replace Method with Method Object).

Another trick if you can't refactor your code is to locate the join point
where your local variable is being assigned, often the result of a method
call, and advise that instead.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx