JDK-8308613 : javax.lang.model updates for JEP 445 (preview)
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-05-23
  • Updated: 2023-10-30
  • Resolved: 2023-06-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b26Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
The first cut of support would be:

Updates to TypeElement.getSimpleName() for an unnamed class
Add new default method for TypeElement.isUnnamed. The semantics of this should be something like return getNestingKind() == TOP_LEVEL && getSimpleName().isEmpty().

There should be some updates to the printing processor to output a source-correct unnamed class and tests that a language model is properly constructed for an unnamed class (name is empty, mandated constructor present, etc.)
Comments
Changeset: 98b53c06 Author: Jim Laskey <jlaskey@openjdk.org> Date: 2023-06-05 18:45:39 +0000 URL: https://git.openjdk.org/jdk/commit/98b53c06cfffe7b2e21968546b4aa1523f31132e
05-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13689 Date: 2023-04-27 12:38:11 +0000
01-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14140 Date: 2023-05-25 05:48:26 +0000
25-05-2023

Expression to detect an unnamed class is isSynthetic() && getNestingKind() == TOP_LEVEL
23-05-2023