r/java • u/artpar • Oct 05 '23
How does the lombok magic work underneath?
https://www.unlogged.io/post/how-does-the-lombok-magic-work-underneath
133
Upvotes
r/java • u/artpar • Oct 05 '23
View all comments
Show parent comment
21
u/rzwitserloot Oct 05 '23
We do not modify javac on the fly. Our plugins and such add an
--add-opensline. And we modify the AST. That's modify, whereas plain jane annotation processors only make new ASTs, they don't modify existing ones.Point is, we modify them as an AST, we don't create new nodes. We don't invent new language constructs that java does not have.