发布于 2016-04-22 10:18:14 | 195 次阅读 | 评论: 0 | 来源: 网友投递
Byteman Java字节码注入工具
Byteman 是一个Java字节码注入工具,用以简化 Java 应用程序的测试和开发,使用名为 fault injection 的技术。通过在应用代码中注入脚本来对应用进行测试。
Byteman 3.0.5 发布了,
一些新特性:
COMPILE/NOCOMPILE clauses can now be inserted into scripts at the top level or into individual rules to enable/inhibit compilation to bytecode
A new LinkMap builtin API has been added to the default Helper, allowing arbitrary data to be easily saved and retrieved from one rule execution to the next. Kudos to Red Hat's Richard Achmatowitz for implementing this extremely useful new API.
A new location specifier AT EXCEPTION EXIT has been provided allowing rules to be triggered by exceptions passing out of a method. After rule processing the original exception is implicitly rethrown unless the rule explicitly THROWs a new synthetic exception or else swallows the exception and perform a synthetic RETURN. I'm very grateful to Red Hat's Gary Brown for pushing such an elegant implementation of this feature in my direction when I was convinced it was going to be my worst plumbing nightmare.
The DTest contrib package has been updated to allow instrumentation of a class by name as an alternative to providing the class instance. Many thanks to Red Hat's Ondrej Chaloupka for providing this update.
下载地址:http://byteman.jboss.org/downloads.html