ASM is an all purpose Java bytecode manipulation and
analysis framework. It can be used to modify existing classes or dynamically
generate classes, directly in binary form. Provided common transformations
and analysis algorithms allow to easily assemble custom complex
transformations and code analysis tools.
ASM offer similar functionality as other bytecode frameworks, but it is
focused on simplicity of use and performance. Because it was designed and
implemented to be as small and as fast as possible, it makes it very
attractive for using in dynamic systems*.
(*) ASM can of course be used in a static way too.
"ASM: a code manipulation tool to implement adaptable systems",
E. Bruneton, R. Lenglet and T. Coupaye,
extensible component systems, November 2002, Grenoble, France. Also
available in french.
"Using ASM framework to implement
common bytecode transformation patterns", E. Kuleshov,
AOSD.07, March 2007, Vancouver, Canada.
ASM is already used in many Java products.
Please let us know if your project is using ASM.
You can also add the "Powered by ASM" button below to your project page.
The best way to learn to use ASM is to write a Java source file
that is equivalent to what you want to generate and then use the ASMifier mode of the
Bytecode Outline plugin for Eclipse (or the
ASMifier tool) to see the equivalent ASM code. If you want
to implement a class transformer, write two Java source files (before and after
transformation) and use the compare view of the plugin in ASMifier mode to compare the
equivalent ASM code.
The following document provides an in-depth introduction to ASM 4.0,
going from the basic features to advanced topics such as bytecode
ASM 4.0 A Java bytecode engineering library.
Tutorial for ASM 2.0.
Tutorial for ASM 1.5.x.
Tutorial for using J2SE 5.0 Annotations with ASM 1.5.x.
Frequently Asked Questions.
ASM 2.0 Classworking.
Annotations with ASM 2.0.
Generics with ASM 2.0.
ASM 4.0 API
ASM 3.3 API
ASM 3.2 API
ASM 3.1 API
ASM 3.0 API
ASM 2.3.3 API
changes from 1.5.3
ASM 1.5.3 API