JEP 4571 Class-File API is a preview API to provide a standard API for parsing, generating, and transforming Java class files.
This repository demonstrates how to create a class that has a field, invokes a method, and prints a message, and also how to parse it with the said API.
class-file-api/src/main/java/org/jugistanbul/GenerateClass.java
Lines 20 to 35 in d0af4de
class-file-api/src/main/java/org/jugistanbul/ParseClass.java
Lines 18 to 26 in d0af4de
sh run.sh
JDK 23 or later