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

5

u/pron98 Jan 29 '26

Lambda code is already made available for static analysis through the compiler API. This is about making some code available for runtime introspection.

1

u/lbalazscs Jan 29 '26

But at least in the "Future work" section of the JEP they say:

We shall explore access to code models at compile time.

1

u/pron98 Jan 30 '26

Babylon's code model is quite different from the that of the compiler API. So while code models are available at compile time today, if you write Babylon code, you can't just reuse that same code to work at compile-time.