Pradeep's Blog

Google

Monday, October 03, 2005

What’s ASM?

ASM is a byte code manipulation framework. It can be used to write a class file from scratch, read the contents of them, or change them dynamically at runtime. There are other tools (BCEL & SERP) that offer the same functionality, but these tools are bulky and very slow compared to ASM. The advantages of ASM over the other tools are given in detail here.
The design of ASM is also been very well thought of. For example, ASM is divided into many packages. This allows its users to use on the package they need. Some of the main packages in ASM are,
Core: Package provides an API to read, write, and transform Java byte code.
Tree: Provides in-memory representation of Java byte code.
XML: Provides an adapter to convert byte code structures to and from XML
Util: Contains several helper classes and simple byte code verifiers that can help in development or testing.
Analysis: Provides basic data-flow analyses and type-checking algorithms
In my subsequent blog I will explain how to use ASM to read a class file.

0 Comments:

Post a Comment

<< Home