-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Java 22 introduced ClassFile API as Preview, let's support real compiler using ClassFile API
- Create class for JsonCompilerBridge
- This creates byte codes for each json elements
- Compiler creates class file with byte codes
- ClassFile compile(JsonAST)
class A {Json process(Object x, Object y, Object z);}- load class file and create Method Handle
- JsonStringTemplateProcessor caches MethodHandle class file and call
A.process(value[0], value[1], value[2])through MethodHandle
JsonCompilerBridge#createJsonString(String strs)
// add str to constant pool
Metadata
Metadata
Assignees
Labels
No labels