[code-reflection] RFR: Conflicting code reflection fields for method overrides [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Jun 28 16:20:42 UTC 2024


On Fri, 28 Jun 2024 16:11:37 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>>> Could we encode an instance of `MethodRef` in the field name...
>> 
>> Maybe I don't know all the javac tricks, but I understand the `MethodRef` instance is composed a bit later in the process. Here we try to reconstruct the composition of it (or at least the method parameters).
>
> Yes, it's a temporary solution We need to think more carefully about a better location such as a method attribute or synthetic annotation, but I think we should do that separately, and we also need to consider quotable lambda expressions too.

Honestly, I would go for a simple fix which addresses this annoying problem now, and perhaps discuss on other ways to address this issue in a separate PR? Specifically, adding attributes etc. seems like throwaway work, given that we might have other plans for how these things should be serialized in the classfile?

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

PR Review Comment: https://git.openjdk.org/babylon/pull/162#discussion_r1658970709


More information about the babylon-dev mailing list