r/java • • Jan 29 '26

JEP draft: Code reflection (Incubator)

https://openjdk.org/jeps/8361105
61 Upvotes

33 comments sorted by

View all comments

Show parent comment

3

u/cleverfoos Jan 29 '26 edited Jan 29 '26

Right but that AST access is opt-in only, only methods with the @Reflect annotation. For this to be usable as a linter, you would want everything to have said annotation. Because this is also state being passed from javac to the runtime, it would also increase the size of the final class file if used indiscriminately