need code example for getting canonical constructor of a Record

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: None
    • Component/s: core-libs
    • b21

      There's no utility method for getting a Record's canonical constructor reflectively. However, it's fairly simple to do given the array of record components. This message suggests this is sufficient if there is an example in the javadoc:

      https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-September/001607.html

      However, there is no such example. One needs to be added.

      Adding the example to Class::getRecordComponents seems reasonable. It might be useful to add a link to it from the java.lang.Record class specification, where it defines the record component concept.

            Assignee:
            Tagir Valeev
            Reporter:
            Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: