Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Local vars and recursion


Uli,

There is no pointcut that matches local variable access because there is no reliable way to identify them: their names are only included in the class as part of the debug information. Method parameters can be matched using args() but only based on type and position. Fields access can be matched using get/set based on both type and name as well as the defining class.

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
http://w3.hursley.ibm.com/~websterm/



ujuarez71@xxxxxxxxxxxx
Sent by: aspectj-users-bounces@xxxxxxxxxxx

18/09/2006 15:43

Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
Re: [aspectj-users] Local vars and recursion





Hi Eric:

"...But this really defeats the purpose of using AOP..."
Is correct apply AOP to debugging areas to advice local vars? I'd like to know a little more about this.

About the last question, I mean: If args pcd matches method arguments and these arguments are local vars implicitly, Can I identfy join points (through the method) for that local vars using the same or similar refactoring?

Thanks a lot and I apologize for any inconvenient with grammar.

 
Uli.
 
 
-----Original Message-----
From: eric.bodden@xxxxxxxxxxxxxx
To: aspectj-users@xxxxxxxxxxx
Sent: Thu, 14 Sep 2006 10:20 PM
Subject: RE: [aspectj-users] Local vars and recursion

Hi.
 
Well, you would have to use a stack in that case, in order to emulate the runtime stack. But this really defeats the purpose of using AOP in the first place I would say. Regarding your last question: I don’t understand what you mean.
 
Eric
 
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of ujuarez71@xxxxxxxxxxxx
Sent:
Thursday, September 14, 2006 7:12 PM
To:
aspectj-users@xxxxxxxxxxx
Subject:
[aspectj-users] Local vars and recursion

 
 Hi,

AspecJ doesn't support local vars pointcuts, instead a way to do it is refactoring local vars to fields. What happens with recursive programs wich contain local vars? Not always refactoring works. Any suggestion?

Also, if args pcd matches local vars, how can I apply a pointcut when they are setting or getting?

Cheers
Uli.



Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.
_______________________________________________

aspectj-users mailing list

aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection._______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top