[Soot-list] Source code of a given SootMethod

Mario Mendez mario at cs.unm.edu
Wed Nov 14 16:47:46 EST 2007


Hi all,

I was trying to find, for a given SootMethod (JimpleBody), the 
equivalent Java source code. For doing that, I'm forcing the compilation 
process to start in the source:
     Options.v().set_src_prec(Options.src_prec_java);
, but then I found no method in the SootMethod class that returns the 
source (since getSource seems not to deal with this).

I guess I could decompile the SootMethod using Dava, but I'm looking for 
a solution that saves that effort by simply retrieving the source 
(String) that might have been stored somewhere when the compilation 
starts in the .java file.


More information about the Soot-list mailing list