tiann / FreeReflection

A library that lets you use reflection without any restriction above Android P

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 ?

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.

commented

到此一游