[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 答复: 答复: how to deal with existing java file or class file?
Hi Helen,
I'd suggest to read our PLDI'03 tutorial, which has more details on soot
internal structures and how a class file is parsed and soot internal
representation is constructed.
> Btw, I have a little question. If we say a class has been sootified,
> does that mean the class has been changed in to sootClass with
> sootMethods, and sootMethods got appropriate jimpleBody in it,
> and jimpleBody got corresponding units in it?
Sootify means the construction of soot internal representation for
.class. The internal representation of a class is SootClass, and
SootMethod for method, JimpleBody for method body, and so on. After
loadClassAndSupport, you can iterate over methods of a class. But the
JimpleBody for the method body may not be constructed yet, you need to
call "retrieveActiveBody" on a SootMethod.
There are several output format of soot, if you donot choose to
overwrite original classes, you have a new sootified class file.
> Since in the tutorial main.java, the result of constructing a
> class from scratch is to get a class with sootMethod, jimpleBody,
> units and so on. May I use the command line u told me to complete
> such a process on an existing classfile?
Yes.
Cheers,
Feng