Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASM 4 (Java Library) tutorials? [closed]

I have recently been working with the Java library 'ASM', which is for modification of bytecode at runtime, in case people didn't know, and I have not been able to find a single tutorial on ASM 4. Except the official manual for ASM 4, which referenced ASM classes that didn't even exist.

I am wondering if anyone knows of any tutorials for the library, which cover basic to intermediate things, such as inserting some code into a method.

like image 416
OllieStanley Avatar asked Apr 01 '13 21:04

OllieStanley


People also ask

What does ASM stand for in Java?

ASM simply stands for ASMifier tool.

What is ASM library?

The ASM library is a project of the OW2 consortium. It provides a simple API for decomposing, modifying, and recomposing binary Java classes (i.e. bytecode). The project was originally conceived and developed by Eric Bruneton.

What is bytecode manipulation?

Bytecode is the instruction set of the Java Virtual Machine (JVM), and all languages that run on the JVM must eventually compile down to bytecode. Bytecode is manipulated for a variety of reasons: Program analysis: find bugs in your application.

What is ASM API?

The ASM API provides two styles of interacting with Java classes for transformation and generation: event-based and tree-based.


1 Answers

What you want to do seems pretty basic (to me). I'd be very surprised if it was not covered, with an example, in the user guide: https://asm.ow2.io/asm4-guide.pdf

There is lots of other documentation linked here: http://asm.ow2.org/

The ASM mailing list is also quite responsive if you ask: http://mail.ow2.org/wws/info/asm

like image 76
Tom Carchrae Avatar answered Sep 22 '22 17:09

Tom Carchrae