Capturing Primitive Assignments [message #578596] |
Sat, 17 April 2004 20:20 |
Bret Messages: 9 Registered: July 2009 |
Junior Member |
|
|
For a school assignment, we are trying to model a stack machine using
AspectJ. I need to figure out how I can write a Pointcut that can execute
before ANY variable is used inside of a method.
For example in this method,
public static int bar(){
String str;
int r;
str = new String(here);
r = str.length();
return r;
}
I need to capture the initialization of 'str' and 'r' and the values they
are assigned. Can anoyne give me a hand or point me in the right
direction? (I already know how one can capture a method and capture a
getter or a setter, but I believe capturing primitives is a little
trickier)
Thanks,
Bret
|
|
|
Powered by
FUDForum. Page generated in 0.03931 seconds