Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Updating variable in the middle of a method

Hi
Suppose I have a method like the following:

public StringBuffer myMethod() {
     StringBuffer sb = new StringBuffer();
     sb.append("1");
     sb.append("2");
     return sb.toString();
}

I want to update this to always return 123.
I would like to do this via an execution pointcut (I don't want to use call)
so I need do get a handle to the sb variable?  Any ideas how this can be
done.

Thanks a million.

 

-- 
View this message in context: http://www.nabble.com/Updating-variable-in-the-middle-of-a-method-tp16742835p16742835.html
Sent from the AspectJ - users mailing list archive at Nabble.com.



Back to the top