Hi,
Let me make your problem clear.
Javassist deals with nested method calls as independent two
method calls. You cannot deal with them as a set of related
methods. For example,
bytestream.write(myfile.toBytes());
is compiled into the following bytecode:
load bytestream
load myfile
call toBytes
call write
ExprEditor first finds "call toBytes" and translates into:
load bytestream
load myfile
<the code passed to relace().
some value must be assigned to $_>
load $_
call write
Then ExprEditor finds "call write" and translates into:
load bytestream
load myfile
<the code passed to replace() for toBytes>
load $_
<the code passed to replace() for write>
load $_ if necessary
So to be honest, I could not understand why you want to give
this code:
{ $_=Similar.method($name, $args);
$_=Similar.getReturnValue(); }
to replace(). Why do you assign the result of Similar.method()
to $_? I think I don't really understand your argument.
Best regards,
Chiba
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837889#3837889
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837889
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user