Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] after advice - change returned value

Hi,

I have the following method:
byte[] getData();

I wanna capture this method now with an after-advice. How can I get the value, which this method returns and change that value?

I know how to do this with arguments and an around-advice (using the proceed-advice) and I know how to capture the return value of a method:
void after() returning(byte[] data)

But how is it possible to change the returned value?
Should I use the after-advice(but how then?)? or should I use the around-advice together with the proceed-statement?

Thanks in advance
Sebastian



Back to the top