https://github.com/xxdark/asm-inline
Inline bytecode in Java
https://github.com/xxdark/asm-inline
asm bytecode inline java
Last synced: 8 months ago
JSON representation
Inline bytecode in Java
- Host: GitHub
- URL: https://github.com/xxdark/asm-inline
- Owner: xxDark
- License: mit
- Created: 2021-02-12T19:21:06.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-17T00:25:11.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T09:41:42.633Z (9 months ago)
- Topics: asm, bytecode, inline, java
- Language: Java
- Homepage:
- Size: 118 KB
- Stars: 51
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# asm-inline
At first I thought: *Oh, I can make an optimization transformer for Proguard*
And then this happened.
Example:
```Java
public class Test {
public static void main(String[] args) {
AsmBlock.inline(b -> {
b.getstatic(System.class, "out", PrintStream.class)
.ldc("Hello, World!")
.invokevirtual(PrintStream.class, "println",
MethodType.methodType(Void.TYPE, String.class));
// Note that RETURN will be added by javac.
});
}
}
```