Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Intercepting field access and thread-safety

Title: Intercepting field access and thread-safety

Hi there

I'd like to know if it's possible to incercept a get field access using AspectJ and modify the returned value.

Of course i could modify the field and set a new value using a before advice, but if the affected instance would be used in a multi threaded environment, this could lead to unwanted race conditions. So it is possible to intercept a field get access and return a defined value without modifying the original value of the field?

Thanks a lot

Mirko


Back to the top