difference between javaassist and cglib

天涯浪子 提交于 2019-12-01 09:24:00

Cglib is no longer actively maintained and the library's developers would not even apply provided patches: https://jaxenter.com/hibernate-to-deprecate-cglib-as-bytecode-provider-102106.html

Additionally, javassist offers an API for modifying classes and not only for subclassing them. These APIs allow also for byte code-level manipulation while cglib only allows for several hardcoded interceptions.

Finally, there is a minor performance difference. For an overview, see this table on a third byte code manipulation framework, Byte Buddy, that I created: http://bytebuddy.net/#/tutorial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!