Add classfile-api module: java.lang.classfile (JEP 484) parse, generate, transform with timing instrumentation, ASM 9.11.1 comparison, version limits, JDK 24/25/26 API diff

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
This commit is contained in:
2026-10-29 04:14:57 +00:00
co-authored by Claude Sonnet 5.5
parent eca73ad544
commit 41101bea40
37 changed files with 1763 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
$ java -cp classes:asm-9.11.1.jar... demo.GenerateDemo target/gen/demo (25.0.5+8-LTS)
generated 501 bytes, major version 69 (wrote target/gen/demo/Generated.class)
ClassFile.verify(bytes) -> 0 problem(s)
PASS verify() finds nothing wrong with the generated class
defineClass -> demo.Generated hidden=false findable by name=true
[defineClass] add(2,3)=5 hello()=Hello from generated bytecode sumTo(100)=5050 classify(-4)=negative classify(4)=non-negative
PASS defineClass: generated methods return the right values
defineHiddenClass -> name starts with 'demo.Generated/': true hidden=true distinct from the normal class=true
[hidden] add(2,3)=5 hello()=Hello from generated bytecode sumTo(100)=5050 classify(-4)=negative classify(4)=non-negative
PASS hidden: generated methods return the right values
Class.forName(hidden name) -> ClassNotFoundException (hidden classes cannot be found by name)
PASS hidden class is hidden, the other is not
exit=0