This content has been marked as final.
Show 1 reply
-
1. Re: Urgent, please give me a hand ???
chiba Jul 6, 2004 11:56 AM (in response to ericmacau)Basically, if you have detailed knowledge of Java bytecode/class file,
you can do all the three things with the lower-level API of Javassist.
If you want to use only higher-level API, then
> 1. retrieve all the variable names and its corresponding values
> (global variables, and local variables) ?
You can obtain not local variable names but all the fields.
> 2. can I insert a statement into a specific line within a method?
Yes.
> 3. can I modify a specific statement ?
The answer depends on the kind of statement.
You can modify method calls, field accesses, etc but not all the kinds.