I want to access a local variable from a method in a business class, in a method which is in an aspect class. For instance
class BusinessClass {
public void simpleTest() {
...
String localString = new String( "test" );
...
}
}
MyAspect {
log() {
// I WANT TO ACCESS THE VALUE OF LOCALSTRING HERE
}
}
I want to access localString's value in log method of MyAspect. Please let me know if there is any way to accomplish this using Spring / AspectJ. Also, is there is a way to accomplish without changing simpleTest method signature?
Thanks much in advance!