Class-File API debug printing capability

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P3
    • 24, 25
    • Component/s: core-libs
    • None
    • source
    • minimal
    • Adding a default method to a sealed interface represents a minimal compatibility risk.
    • Java API
    • SE

      Summary

      Restore debug printing capability in the Class-File API.

      Problem

      The Class-File API has lost its debug printing capability with removal of the components package and, more specifically of the ClassPrinter class as part of JDK-8345343.

      Solution

      Add a method, namely CompoundElement::toDebugString, to retrieve a textual representation of the element.

      Specification

          /**
           * {@return a text representation of the compound element and its contents for debugging purposes}
           *
           * The format, structure and exact contents of the returned string are not specified and may change at any time in the future.
           */
          default String toDebugString()
      

            Assignee:
            Adam Sotona
            Reporter:
            Adam Sotona
            Chen Liang, Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: