Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Why no args() for get()?

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


Back to the top