jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Chow" <ec...@macaucabletv.com>
Subject Urgent , BCEL beginner questions ???
Date Thu, 01 Jul 2004 07:49:33 GMT
Hi,

I am going to use BCEL to do some education project.
But I have so many problems and questions if I should use BCEL or other
library.


1. retrieve all the variable names and its corresponding values (global
variables, and local variables) ?
2. can I add a method with some source expression ??
    for example,

    clazzGen.addMethod(" int a = 10; System.out.println(a); "); // something
like this, Javassist provides this ....

3. can I insert a statement into a specific line within a method?
     for example,

     public void init() {
        int a = 10;
                    // <<<<<<< insert a statement here :    a = a * a;
        System.out.println(a);
     }

4. can I modify a specific statement ?
     for example,

     public void init(int x) {
        return x;     //<<<<<<<  modify it to:    return (x * 2);
     }


Would you please to show me some example about the above questions ???
Please give me a hand !!! It's very urgent for me...
Thanks a lot.


Best regadrs,
Eric



==========================
If you know what you are doing,
it is not called RESEARCH!
==========================


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Mime
View raw message