电脑技术学习

ObjectWeb ASM 3.0 beta2 发布

dn001
ObjectWeb ASM 3.0 beta2 版本发布了.

ASM是一套JAVA字节码生成架构。它可以动态生成二进制格式的stub类或其他代理类,或者在类被JAVA虚拟机装入内存之前,动态修改类。ASM 提供了与 BCEL( http://jakarta.apache.org/bcel)和SERP( http://serp.sourceforge.net/ )相似的功能,只有22K的大小,比起350K的BCEL和150K的SERP来说,是相当小巧的,并且它有更高的执行效率,是BCEL的7倍,SERP的11倍以上。ASM一贯的设计思想就是将其应用于动态生成领域,因此小巧和快捷一直是这个产品的设计和实现的指导思想。

ASM的最终目标是创建一个生成工具,可以被用来执行对任何类的处理操作(不像一些工具,比如Javassit,它只支持预先定义的类操作,然而在许多场合这一功能是有局限性的)。

关于新版本,官方提到:
"Main changes in this release: visitFrame is now called after visitLabel in ClassReader, new SKIP_FRAMES and SKIP_CODE flags in ClassReader, fixed issue with dead code and COMPUTE_FRAMES option in ClassWriter, port of bug fixes from ASM 2.2.2, refactorings in core package to get same performances as in ASM 2.x (3.0 beta was slightly less performant than 2.x), refactored tests and added many new tests. Tests now cover 100% of the code, except in commons package. This version is still a beta only because the API for tree package may change before final release. The core package is now stable and fully tested."

标签: