[Soot-list] Extract the method return value

Nuno Machado nmachado at gsd.inesc-id.pt
Mon Apr 23 13:30:27 EDT 2012


Hi everyone,

I was wondering how to extract the return value of a static invoke. For instance, how to get the result of calling the method getText() in the following code?

this := @this: gui.MainWindow
$r0 = this.<gui.MainWindow: javax.swing.JTextField textWindow>
$r1 = virtualinvoke $r0.<javax.swing.JTextField: java.lang.String getText()>()

Soot says that $r1 is of type java.lang.String, but I get an exception when I try to cast either leftOp or rightOp to StringConstant. Is there another way to do this?

Thanks in advance,
Nuno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120423/65a08eb6/attachment.html 


More information about the Soot-list mailing list