Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235550

Clarify record reflective support specification

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:

      Description

      A number of issues and/or concerns have been raised recently relating
      to the reflective support for records. These arose when finalizing and
      completing the runtime CSR. Taken together they seem to lead back to a
      few small, but significant, omissions in the spec that would be good to
      tighten up. It is important that it be possible to reflectively reason
      about record classes in a way that is unambiguous and provides
      certainty that the record class is well-formed.

      For a class to be a record class, then:

        1) It's direct superclass must be java.lang.Record, and
        2) It must have a Record attribute.

      The entry point to the reflective API for records is the two methods:
      Class::isRecord and Class::getRecordComponents.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                chegar Chris Hegarty
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: