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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a useful CodeConverter method:redirectMethodCallToStatic #244

Merged
merged 1 commit into from Feb 2, 2019
Merged

add a useful CodeConverter method:redirectMethodCallToStatic #244

merged 1 commit into from Feb 2, 2019

Conversation

shifujun
Copy link
Contributor

@shifujun shifujun commented Feb 1, 2019

Redirect non-static method call to a static method call is very useful in AOP programing. But as a rookie of bytecode manipulation, we saw the doc of Javassist and the comments in CodeConverter.java, and we were thinking of it's very hard to do this. Because there is no such method in CodeConverter , the redirectMethod limit it with same invoke type, the insertBefore limit it with void return type.

In fact, it's very easy to accomplish. So I hope this PR can remain our rookies from using Bytecode level API馃榿.

@chibash chibash merged commit 0ac942c into jboss-javassist:master Feb 2, 2019
@chibash
Copy link
Member

chibash commented Feb 2, 2019

The patch looks fine. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants