[code-reflection] RFR: Add support for more types [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Apr 25 19:02:53 UTC 2024


On Thu, 25 Apr 2024 18:35:03 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/reflect/code/type/CoreTypeFactory.java line 128:
>> 
>>> 126:                     throw new IllegalArgumentException("Bad type-variable bounds: " + tree);
>>> 127:                 }
>>> 128:                 String[] parts = identifier.split("::");
>> 
>> And this is the duplicate parsing logic (although here we already know if it's a method or a class type-variable based on the number of `::`)
>
> I am wondering if instead we can check `#`, and the parsers job is dumbly accumulate all valid characters (selected tokens and identifiers) up to but not including the `<` token. We could even check if there is quoted string for the type identifier.
> 
> Note the special code for arrays in the parser was added only to avoid updating many tests.

I can take a look

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

PR Review Comment: https://git.openjdk.org/babylon/pull/51#discussion_r1579998766


More information about the babylon-dev mailing list