[code-reflection] RFR: Support array type constants in code model [v3]

Hannes Greule hgreule at openjdk.org
Mon Jan 22 17:20:24 UTC 2024


> Previously, expressions like `String[].class` weren't supported in the code model.
> 
> As types are embedded by their fully qualified names (e.g. `java.lang.String[]`), we also have to parse that representation again. I didn't find an existing method to do so, so I wrote it myself. Please let me know if there's a better approach.
> 
> I also adapted the test from `TestArrayCreation.java`, using different kinds of array types.

Hannes Greule has updated the pull request incrementally with one additional commit since the last revision:

  Use TypeDesc.ofString instead of custom parsing

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

Changes:
  - all: https://git.openjdk.org/babylon/pull/5/files
  - new: https://git.openjdk.org/babylon/pull/5/files/b2e43743..56f9f7b8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=5&range=02
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=5&range=01-02

  Stats: 15 lines in 1 file changed: 0 ins; 14 del; 1 mod
  Patch: https://git.openjdk.org/babylon/pull/5.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/5/head:pull/5

PR: https://git.openjdk.org/babylon/pull/5


More information about the babylon-dev mailing list