Jump to content

ObjectWeb ASM

From Alfawiki
ASM
Company typeSoftware framework
IndustrySoftware development
FounderEric Bruneton
ProductsJava bytecode inspection, alteration, and creation API
ParentOW2 consortium

The ASM framework, initially developed by Eric Bruneton and maintained by the OW2 consortium, provides a concise API designed for the inspection, alteration, and creation of Java bytecode. ASM specializes exclusively in Java bytecode and does not accommodate other formats such as those used by the .NET or Python environments.

The term "ASM" is derived from the asm keyword found in the C programming language, symbolizing its purpose in handling low-level code transformations.

Uses

ASM offers access to Java class structures through a visitor-based API alongside a more abstract tree API that represents classes as objects. These interfaces enable developers to modify existing bytecode or produce new classes from scratch, supporting tasks such as code injection. Principal commercial uses include:

Performance Monitoring and Profiling
Embedding instrumentation within Java binaries to gather data on metrics like memory consumption and code coverage.
New Language Feature Implementation
Employed by languages such as Groovy for bytecode generation, as well as by Aspect-Oriented programming tools to facilitate point-cut detection and code weaving (for example, AspectWerkz).

Invokedynamic

Beginning with version 3.2, ASM incorporated support for the invokedynamic opcode introduced in JDK 7, which allows dynamic method calls with runtime type verification. This advancement improves compatibility with dynamically typed JVM languages.

Release history

The following table summarizes significant milestones in ObjectWeb ASM's evolution, emphasizing major language compatibility and platform enhancements.

Release Release Date Key Features
2.0 2005-05-17 Enabled support for Java 5 language features
3.2 2009-06-11 Added invokedynamic instruction handling
4.0 2011-10-29 Introduced compatibility with Java 7
5.0 2014-03-16 Supported Java 8 language constructs
6.0 2017-09-23 Transitioned codebase to GitLab; included Java 9 support
6.1 2018-03-11 Added support for Java 10
7.0 2018-10-27 Included Java 11 language features
7.1 2019-03-03 Extended support to Java 13
8.0 2020-03-28 Supported Java 14 features
9.0 2020-09-22 Added compatibility with Java 16
9.1 2021-02-06 Java 17 support introduced
9.2 2021-06-20 Included Java 18 support
9.3 2022-04-03 Java 19 compatibility added; released new Maven BOM

See also

External links