[Soot-list] Fast Lookup of SootMethod/SootMethodRef

Phil Pratt-Szeliga pcpratts at trifort.org
Wed Feb 27 14:17:59 EST 2013


Hi Marc-Andre,

If I were you I would keep a HashSet of method signatures (strings).

Phil Pratt-Szeliga
Syracuse University
http://trifort.org/

On Wed, Feb 27, 2013 at 2:03 PM, Marc-Andre Laverdiere-Papineau
<marc-andre.laverdiere-papineau at polymtl.ca> wrote:
> Hello,
>
> I want to check against a whitelist of methods, and I stored
> SootMethodRef instances in a big HashSet.
>
> Weirdly enough, using set.contains(), I kept on getting false.
>
> I looked into the implementation, and it seems like equals and hashcode
> are not implemented.
>
> Is this something that was left out voluntarily?
>
> Should I use a set or bit set with getNumber()? Are those numbers
> guaranteed to have no collisions?
>
> Otherwise, what is the fast way to do such lookups?
>
> Regards,
>
> --
> Marc-André Laverdière-Papineau
> Doctorant - PhD Candidate
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


More information about the Soot-list mailing list