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

如何增强接口的jdk代理 #486

Open
abbracadabra opened this issue Dec 16, 2024 · 1 comment
Open

如何增强接口的jdk代理 #486

abbracadabra opened this issue Dec 16, 2024 · 1 comment

Comments

@abbracadabra
Copy link

abbracadabra commented Dec 16, 2024

代码:

new EventWatchBuilder(watcher)
  .onClass("com.xxx.SomeInterface")
  .includeSubClasses()
  .onBehavior("someMethod")
  .onWatch(listener,BEFORE,RETURN)

问题描述:
我有个接口com.xxx.SomeInterface ,它有个jdk代理,和一个子类,我希望上面的代码增强的是接口的jdk代理,而不是增强接口的子类。实测上面的代码增强的是接口的子类,未增强jdk代理

@Aresxue
Copy link

Aresxue commented Jan 13, 2025

new EventWatchBuilder(watcher).onClass("*").hasInterfaceTypes("com.xxx.SomeInterface")

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