ASM is an open-source java library for manipulating bytecode.
Note that the scope of the ASM library is strictly limited to reading, writing, transforming and analyzing classes.
In particular the class loading process is out of scope.
主要内容
文章
文章列表:
- 《Java ASM系列一:Core API》主要是针对 ASM 当中 Core API 的内容进行展开。
- 《Java ASM系列二:OPCODE》主要是针对
MethodVisitor.visitXxxInsn()
方法与 200 个 opcode 之间的关系展开,同时也会涉及到 opcode 对于 Stack Frame 的影响。 - 《Java ASM系列三:Tree API》主要是针对 ASM 当中 Tree API 的内容进行展开。
- 《Java ASM系列四:代码模板》主要是整理 ASM 代码,将常用的功能编写成“模板”,在使用时进行必要的修改,才能使用。
- 《Java ASM系列五:源码分析》主要是对 ASM 源代码进行介绍。
视频
视频列表:
Website | Core API(90个视频) | OPCODE(41个视频) | Tree API(52个视频) |
---|---|---|---|
51CTO | Core API | OPCODE | Tree API |
Bilibili | All In One = Core API + OPCODE + Tree API | ||
Youtube | Core API | OPCODE | Tree API |
需要注意的一点,在B站当中,Java ASM 的系列一、二、三的视频放到了一个视频列表里:
- 编号为 001~090 的视频属于系列一
- 编号为 101~141 的视频属于系列二
- 编号为 201~252 的视频属于系列三
代码
代码仓库:
直播
- 《Java ASM字节码操作(已结束)》主要是对《Java ASM系列一:Core API》和《Java ASM系列三:Tree API》内容的精简,能够快速上手使用ASM,进行一些常用的操作。
网盘下载
JavaASM系列(百度网盘)
- 链接:https://pan.baidu.com/s/1P9_ja4VXYXw99cadRV97eg
- 提取码:
fsnf
JavaASM系列(阿里云盘)
- 链接:https://www.aliyundrive.com/s/HKGRaTSFV3N
- 提取码:
dt64
参考资料
ASM相关:
Oracle相关文档:
常用的字节码类库:
使用字节码进行代码分析:
Java字节码交流群: