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

Paul Sandoz psandoz at openjdk.org
Wed Jan 8 16:51:12 UTC 2025


On Wed, 8 Jan 2025 16:23:06 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add missing javadoc
>
> 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.

> src/jdk.incubator.code/share/classes/jdk/incubator/code/internal/Quotable2.java line 6:
> 
>> 4: import jdk.incubator.code.Quoted;
>> 5: 
>> 6: public interface Quotable2 extends Quotable {
> 
> A better name would be preferrable. Maybe `AccessibleQuotable` ?

Yes, something more descriptive.

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

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


More information about the babylon-dev mailing list