[code-reflection] RFR: Remove MethodTypeDesc [v2]

Paul Sandoz psandoz at openjdk.org
Fri Mar 1 16:41:56 UTC 2024


On Fri, 1 Mar 2024 12:35:07 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename
>
> src/java.base/share/classes/java/lang/reflect/code/descriptor/MethodDesc.java line 108:
> 
>> 106:     // @@@ Where else to place them?
>> 107: 
>> 108:     static FunctionType ofNominalDescriptor(MethodTypeDesc d) {
> 
> These seems straightforward mapping from MTD -> FT (and back). So it feels like they should go in FunctionType.
> 
> Simiilarly, classDesc -> TE mapping (and maybe back) should be in either TypeElement or JavaType.

Given `FunctionType` is not specific to Java types i was reluctant to place Java-specific functionality on it. The current location is  temporary. `JavaType` has some functionality to mediate between `ClassDesc`, may be that is the right place to place mediate with other nominal descriptors, or maybe we need a specific place for this, resolution, and reasoning about specific types?

I wanted to wait until we improve the modeling of Java types, and rethink the naming/location of the (Java-specific) `*Desc` classes.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/31#discussion_r1509246298


More information about the babylon-dev mailing list