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

实现类未能重写父类的方法如何transform这个实现类(而非父类,主要实现类太多不能监听父类),使用EventWatchBuilder #468

Open
shixiaoxin opened this issue Jun 7, 2024 · 2 comments

Comments

@shixiaoxin
Copy link

No description provided.

@shixiaoxin shixiaoxin changed the title 实现类未能重新父类的方法如何监听 实现类未能重写父类的方法如何transform这个实现类(而非父类,主要实现类太多不能监听父类),使用EventWatchBuilder Jun 7, 2024
@z529192557
Copy link
Collaborator

transform父类,而不是实现类,然后根据堆栈,反射获取到当前实例的真实类型,根据真实类型再做自己的逻辑

@Aresxue
Copy link

Aresxue commented Jul 30, 2024

transform父类,而不是实现类,然后根据堆栈,反射获取到当前实例的真实类型,根据真实类型再做自己的逻辑

这里是否可以提供一个高级选项,开启后如果发现是父类的方法则将父类的字节码copy一份然后在这份上做改写,唯一需要额外处理的是如果有super逻辑则需要也执行父类的super方法。

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

3 participants