Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] aspects on variables

Hi,
There are two things I’m trying to do with aspectj, and I can’t seem to find any info about them in the documentation so I’m not sure if aspectj supports them.
1. I’d like to write an aspect for a variable after an assignment.  For example, if I had a piece of code that looked like this:
x = a.foo()
I’d like to write an aspect for the LHS so that I can know that the variable is “x”, and figure out it’s location.

2. Similiarly, when “x” gets used in an api call later, I’d like to be able to know it is being used.  For example,  
a.bar(x)
Is there some way in aspectj to say, “tell me when ‘x’ gets loaded”.

Any information would be appreciated. 
Thanks,
Reema


Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Back to the top