Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Updating a returned variable

Simple question time! Can I update a property on a returned object with an

Suppose I have a method:

public MyObject myMethod() {
    // Code which changes MyObject

I wish to have an aspect which will change a property on MyObject. I know I
can use an around advice, can be used to return a specific MyObject
reference, but I want to get the existing MyObject reference and just change
a property on it, something like


I don't want to change anything else.

Any ideas? 


View this message in context:
Sent from the AspectJ - users mailing list archive at

Back to the top