Instead of args(), try using target().  Also, if you want to use
reflection, you can do field.setAccessible(true) to access private
members.

On Tue, Sep 30, 2008 at 7:22 PM, David Mohr <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> I want to write an aspect which monitors what the current value is on
> field accesses. I thought that a get() pointcut with args() would be
> exactly what I need, but then in the docs I see that get() does not
> support args(). I tried to work around it by using reflection (get the
> Field from the FieldSignature), but then I get access violations from
> the jvm runtime since some of the fields I am trying to access are
> private, and the currently executing code is the aspect. Declaring the
> aspect privileged does not change anything, since this is a runtime
> not a compile time problem.
>
> Is there a way I can work around that?
>
> Thanks!
>
> ~David
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to