I initially thought that I can just call MethodGen.getLocalVariables(), get the local variables table, locate my variable given its index then get the scope from the LocalVariable object (using getStartPC and getLength).
It turned out that if the target byte code is not compiled with the DEBUG option turned on, MethodGen.getLocalVariables() only returns entries corresponding to the arguments of a method and ignores the local variables declared inside the method
For example, in the method foo( ) below, the returned table will have a single entry as opposed to 3:
public static void foo (int x )
{
int y, z;
}Any ideas?
Thanks, Wes
_________________________________________________________________
Check out the coupons and bargains on MSN Offers! http://shopping.msn.com/softcontent/softcontent.aspx?scmId=1418
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
