Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否hook类的构造方法? #77

Open
yaeio opened this issue Sep 29, 2018 · 2 comments
Open

能否hook类的构造方法? #77

yaeio opened this issue Sep 29, 2018 · 2 comments

Comments

@yaeio
Copy link

yaeio commented Sep 29, 2018

另外,如果想hook匿名内部类,有没有思路?

@rk700
Copy link
Member

rk700 commented Sep 30, 2018

可以,构造方法对应的也是ArtMethod结构体。匿名类也是需要先通过反射拿到目标方法的ArtMethod

@yaeio
Copy link
Author

yaeio commented Sep 30, 2018

可以,构造方法对应的也是ArtMethod结构体。匿名类也是需要先通过反射拿到目标方法的ArtMethod

反射拿到目标方法这个需要在匿名内部类中写反射获取类名以及方法签名的代码吗,能否不破坏类原代码来获取呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants