How to disable the meta-reflection for a few functions ?
alokas opened this issue · comments
Is there a way to exempt a few methods, etc from being meta reflected after we use "Unseal"? if so, where do we add the exemptions ?
use this API: https://github.com/tiann/FreeReflection/blob/master/library/src/main/java/me/weishu/reflection/Reflection.java#L80
Add the methods you want to exempt
Thanks Tiaan ... Where do I call this method, same place where we unseal it ? Like this ?
@Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); Reflection.exempt("method1", "method2"); Reflection.unseal(base); }
or just before calling a method ?
Before you call the method.
Ok, this is because, we have a jar file that was given to us by a third party, and they have used reflection- We don't have the code for the jar file, and we wanted to make it work by using this ... so, the easiest way to do would have been just unseal some methods.
Any suggestions ?And so sorry for the bother - and thankyou very very much !!!!!
Why only unseal some methods? You can use the API I mention above.
到此一游