[Soot-list] How To Add Classes To Instrument Dynamically

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Aug 20 09:34:11 EDT 2008


Hi Bashar.

You should be able to load that class via
Scene.v().loadClassAndSupport("String"). You then have to make the
SootClass an application class by calling setApplicationClass(). After
that it should be processed by any transformer that you invoke (or you
can call a BodyTransformer manually on bodies of that class).

Eric

2008/8/19 Bashar Al Rawi <brawi at umich.edu>:
>
> Hi,
>
> It seems that you can only instrument that classes that you pass by in the
> argument list to Soot.Main. Is there any way that I could instrument classes
> dynamically?
> In other words, suppose I encounter a class Foo as a field in some other
> class. How can I tell Soot to instrument this class file Foo and write it
> out to Foo.class?
>
> Thanks
>
> --
> Bashar
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list