Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] set() capture oldvalue

I've used the following pointcut to capture all field modifications that occur within a setter method.

pointcut fieldSet(Object newValue) : set(* SomeClass+.*) && args(newValue) && withincode(* SomeClass+.set*(..));

I can capture the new value, but I can't capture the old value without resorting to reflection.
In theory aspectJ could provide access to the old value more statically.
But aspectJ doesn't seem to support this.
Or am I missing something?


Tim Schafer
tschafer@xxxxxxxxxxx




Back to the top