[code-reflection] RFR: Implementation of -XDreflectAll switch [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Jan 9 10:03:42 UTC 2026


On Thu, 8 Jan 2026 16:25:43 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> This is a proposal for a `reflectAll` javac switch that provides code reflection models for all eligible methods and lambdas when enabled.
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
> 
>   catching and logging runtime exceptions when reflectAll enabled

src/jdk.incubator.code/share/classes/jdk/incubator/code/internal/ReflectMethods.java line 206:

> 204:         if (isReflectable) {
> 205:             if (currentClassSym.type.getEnclosingType().hasTag(CLASS) || currentClassSym.isDirectlyOrIndirectlyLocal()) {
> 206:                 // Reflectable methods in local classes are not supported

The comment here seems wrong (pre-existing). This (pre-existing) condition will exclude member inner classes as well, not just local classes. But the new change is good, because the old test was probably not enough to cover local classes defined inside static methods.

-------------

PR Review Comment: https://git.openjdk.org/babylon/pull/822#discussion_r2675561747


More information about the babylon-dev mailing list