[Soot-list] SootClass.getMethod
Steven Arzt
Steven.Arzt at cased.de
Thu Nov 26 10:12:07 EST 2015
Hi Eugen,
SootClass.getMethod() expects a subsignature, not a full signature. In your
case, this would be "void close()".
Best regards,
Steven
-----Ursprüngliche Nachricht-----
Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Eugen Zalinescu
Gesendet: Donnerstag, 26. November 2015 16:04
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] SootClass.getMethod
Hello,
I have the following code:
SootClass c = Scene.v().getSootClass("java.io.PrintWriter");
SootMethod m = c.getMethodByName("close");
String name = "<java.io.PrintWriter: void close()>";
assert(m.getSignature().equals(name));
Scene.v().getMethod(name);
c.getMethod(name);
which fails on the last line with:
Exception in thread "main" java.lang.RuntimeException: No method
<java.io.PrintWriter: void close()> in class java.io.PrintWriter
at soot.SootClass.getMethod(SootClass.java:297)
at soot.SootClass.getMethod(SootClass.java:321)
at org.tcs.Main.main(Main.java:368)
Could someone please explain to me why the calls to 'c.getMethodByName' and
'Scene.v().getMethod' succeed, while the call to 'c.getMethod' fails? Is
this a bug or should I have prepared the class in some way beforehand?
Thanks,
Eugen
_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
More information about the Soot-list
mailing list