[Soot-list] Generating code for enumaration

Daniele Altomare daniele.altomare at sysmosoft.com
Mon Feb 2 11:13:36 EST 2015


Hi all,

I'm getting stuck at generating code for an enum in a BodyTransformer.

I have to pass the the proxy type to a method and that's defined by an enum.
If I run the driver class for a java program where I define the proxy (so I can see the Jimple code) I get this for the method body:


$r6 = <java.net.Proxy$Type: java.net.Proxy$Type HTTP>;



I've tried in this way but it doesn't work:

SootClass clsProxyType = Scene.v().getSootClass("java.net.Proxy$Type");

Local proxyType = Jimple.v().newLocal("proxyType", RefType.v(clsProxyType));

b.getLocals().add(proxyType);



Can someone help me with this?



Thanks!

Daniele

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150202/5605f23e/attachment-0001.html 


More information about the Soot-list mailing list