ASM library

The ASM library is a project of the OW2 consortium (ObjectWeb was a joint project launched in 2002 by INRIA, Bull, and France Telecom)

What does asm standard for?

ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify existing classes or to dynamically generate classes, directly in binary form.

Name

The name “ASM” is not an acronym: it is just a reference to the asm keyword of C, which allows some functions to be implemented in assembly language.

see: https://asm.ow2.io/asm4-guide.pdf

Libraries (and Copies)

Class:

  • org.springframework.asm.ClassWriter (org.springframework:spring-core)
  • org.objectweb.asm.ClassWriter (org.ow2.asm:asm:7.1 <- cglib:cglib:3.3.0)
  • jdk.internal.org.objectweb.asm.ClassWriter (rt.jar 仅内部使用)

Both the libraries are copies of the ASM library, which provides low-level bytecode manipulation capabilities (ASM -> assembly).

Spring or others change the package names of ASM and repackage it for their internal use. This is to avoid conflicts in case a user of these libraries wants to use their own version of ASM. By having the renamed packages, both versions can happily coexist. The JDK does this as well - you can see that jdk.internal.org.objectweb.asm.util.ASMifier for example is part of the JDK. The ‘jdk.internal’ prefix is to avoid conflicts with other versions of ASM users might want to use.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值