findAndHookMethod help!

220 posts
Thanks Meter: 47
 
By slvrbllt, Senior Member on 26th June 2014, 01:47 PM
Post Reply Subscribe to Thread Email Thread
Hi all,

I need to set an hook to a method whose signature is

public ArrayList<Object> populateList(Map<String, Object> paramMap, boolean paramBoolean1, boolean paramBoolean2)

I do not seem able to retrieve the class for the first parameter (ie: Map<String, Object>). What sintax am I supposed to use when invoking the hook method?

findAndHookMethod(classString, lpparam.classloader, "populateList", ?????, boolean.class, boolean.class, new XC_MethodHook() {...}

Thanks in advance
Silver.
 
 
26th June 2014, 10:33 PM |#2  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter: 4,477
 
Donate to Me
More
Quote:
Originally Posted by slvrbllt

Hi all,

I need to set an hook to a method whose signature is

public ArrayList<Object> populateList(Map<String, Object> paramMap, boolean paramBoolean1, boolean paramBoolean2)

I do not seem able to retrieve the class for the first parameter (ie: Map<String, Object>). What sintax am I supposed to use when invoking the hook method?

findAndHookMethod(classString, lpparam.classloader, "populateList", ?????, boolean.class, boolean.class, new XC_MethodHook() {...}

Thanks in advance
Silver.

Try "Map.class".
Off the top of my head, I think generics are not part of the method signatures with regards to uniqueness; they only serve to aid the compiler in checking types during compilation.
27th June 2014, 09:46 AM |#3  
slvrbllt's Avatar
OP Senior Member
Flag Rome (Caput Mundi)
Thanks Meter: 47
 
More
Thumbs up
Quote:
Originally Posted by Tungstwenty

Try "Map.class".

Duh!! It worked...
Thanks mate!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes