[code-reflection] RFR: Make Quotable a marker interface [v4]

Mourad Abbay mabbay at openjdk.org
Wed Jan 8 21:36:38 UTC 2025


On Wed, 8 Jan 2025 16:47:06 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> src/jdk.incubator.code/share/classes/jdk/incubator/code/Op.java line 499:
>> 
>>> 497:             return Optional.of(q2.quoted());
>>> 498:         }
>>> 499:         Method method;
>> 
>> I believe this part is not required? E.g. we can only support cases where the instance implements `Quotable2`. (meaning we know that implementation :-) )
>
> The `LambdaMetaFactory` needs updating so the FI implementation also implements the internal `Quoted2`. I don't know if there are any access control issues with the non-exported interface being defined outside of `java.base`. If so we might need an internal interface in `java.base` whose `quoted` method returns `Object`, and is exported to the code module.

FI implementation can't access Quotable2 because it's not exported.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/302#discussion_r1907889171


More information about the babylon-dev mailing list