<div dir="ltr"><div>I had the same question before. Some confusion might come because soot does not distinguish between method declarations and method references. Both are SootMethod. Yet both are managed by soot and &quot;GENERALLY&quot; there&#39;s one single instance for any individual method signature. As long as you don&#39;t try to instantiate SootMethod yourself, comparing them by == should be fine.<br><br></div>Yet in the code example above, if you call resolve() multiple time, I&#39;m not sure what will happen.<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 June 2016 at 06:28, Steven Arzt <span dir="ltr">&lt;<a href="mailto:Steven.Arzt@cased.de" target="_blank">Steven.Arzt@cased.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">There should actually only be one instance of every Soot method. The resolver checks whether the method is already resolved. If so, no new instance is generated.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:soot-list-bounces@CS.McGill.CA" target="_blank">soot-list-bounces@CS.McGill.CA</a> [mailto:<a href="mailto:soot-list-bounces@CS.McGill.CA" target="_blank">soot-list-bounces@CS.McGill.CA</a>] <b>Im Auftrag von </b>Denis Bogdanas<br><b>Gesendet:</b> Samstag, 14. Mai 2016 03:54<br><b>An:</b> Simone Aonzo<br><b>Cc:</b> <a href="mailto:soot-list@CS.McGill.CA" target="_blank">soot-list@CS.McGill.CA</a><br><b>Betreff:</b> Re: [Soot-list] Equality of SootMethod<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Actually my answer above is not right. I just encountered a new place where SootMethod is instantiated: inside SootMethodRefImpl.resolve().<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">I agree, an equals() would be highly useful.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On 12 May 2016 at 10:11, Denis Bogdanas &lt;<a href="mailto:denis.bogdanas@gmail.com" target="_blank">denis.bogdanas@gmail.com</a>&gt; wrote:<u></u><u></u></p><div><p class="MsoNormal" style="margin-bottom:12.0pt">I believe Scene has only one instance of SootMethod for every method. Plain == is enough. You are not supposed to instantiate SootMethod by yourself.<u></u><u></u></p></div><div><div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On 12 May 2016 at 08:08, Simone Aonzo &lt;<a href="mailto:simone.aonzo@gmail.com" target="_blank">simone.aonzo@gmail.com</a>&gt; wrote:<u></u><u></u></p><p class="MsoNormal">Hi all,<br><br>how can I check if two SootMethod are equals?<br><br>There isn&#39;t an equals override in the source:<br><a href="https://github.com/Sable/soot/blob/develop/src/soot/SootMethod.java" target="_blank">https://github.com/Sable/soot/blob/develop/src/soot/SootMethod.java</a><br><br>Have a nice day,<br>Simone<br>_______________________________________________<br>Soot-list mailing list<br><a href="mailto:Soot-list@CS.McGill.CA" target="_blank">Soot-list@CS.McGill.CA</a><br><a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><u></u><u></u></p></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p></div></div><p class="MsoNormal"><span><span style="color:#888888">-- <u></u><u></u></span></span></p><div><div><p class="MsoNormal"><span style="color:#888888">Denis</span><u></u><u></u></p></div></div></div></div><p class="MsoNormal"><br><br clear="all"><br>-- <u></u><u></u></p><div><div><p class="MsoNormal">Denis<u></u><u></u></p></div></div></div></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Denis<br></div></div>
</div>