[Soot-list] Creating a class from existing class

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Fri Mar 4 10:41:49 EST 2011


Hello.

Soot does not support this very well. You need to create new fields
that have the same signatures as the original ones. Similar, you need
to create new methods with the same signatures as the original ones.
Method *bodies* you can copy using this method:
http://www.sable.mcgill.ca/soot/doc/soot/Body.html#importBodyContentsFrom(soot.Body)

Eric

On 4 March 2011 15:57, Xiaoyong Zhou <zhou.xiaoyong at gmail.com> wrote:
> Hi, All:
>
> I am trying to create a class from an existing class and want to duplicate
> an class and then modify it. Note that I want to keep the previous class.
> But I did not figure out how to "clone" an class in soot Scene. I was
> thinking about copy fields by fields and methods by methods, but it does not
> work because I can not add an SootMethod of class A to class B. Need some
> help. Thanks a lot.
>
> --
> Sincerely yours,
> Xiaoyong Zhou
> School of Informatics and Computing
> Indiana University, Bloomington, IN
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


More information about the Soot-list mailing list