Developer(s) | OW2 Consortium |
---|---|
Stable release |
5.2 / December 23, 2016
|
Preview release |
6.0 Alpha / June 19, 2016
|
Written in | Java |
Operating system | Cross-platform |
Type | bytecode Engineering Library |
License | BSD License |
Website | http://asm.ow2.org/ |
The ASM library is a project of the OW2 Consortium. It provides a simple API for decomposing, modifying, and recomposing binary Java classes (i.e. bytecode). The project was originally conceived and developed by Eric Bruneton. ASM is Java-centric at present, and does not currently have a backend that exposes other bytecode implementations (such as .NET bytecode, Python bytecode, etc.).
The ASM name does not mean anything: it is just a reference to the asm keyword of C, which allows some functions to be implemented in assembly language.
ASM provides a simple library that exposes the internal aggregate components of a given Java class through its visitor oriented API. ASM also provides, on top of this visitor API, a tree API that represents classes as object constructs. Both APIs can be used for modifying the binary bytecode, as well as generating new bytecode (via injection of new code into the existing code, or through generation of new classes altogether.) The ASM library has been used in several diverse applications, such as:
Since version 3.2, ASM has added support for the new invokedynamic
code, which allows method invocation relying on dynamic type checking on the latest JDK 7 binaries, thus easing support for dynamically typed languages.