Summary
-------
Mark some ClassDesc methods, whose implementations are now specialized into subclasses in the sealed hierarchy, as abstract.
Problem
-------
ClassDesc is getting specific implementations; some previous default implementations are better converted to non-concrete abstract methods and be overridden in implementations instead.
The specification of `displayName` is too restrictive; there are other human-readable options for class or interface names such as package abbreviations, but the current spec of `displayName` forbids such implementations.
Solution
--------
Make these methods in `ClassDesc` abstract (non-default):
- `arrayType()`
- `arrayType(int)`
- `displayName()`
Relax the implementation specification on `displayName()`.
Specification
-------------
```
- default ClassDesc arrayType() {
+ ClassDesc arrayType() {
- default ClassDesc arrayType(int rank) {
+ ClassDesc arrayType(int rank) {
- * Returns a human-readable name for the type described by this descriptor.
- *
- * @implSpec
- * <p>The default implementation returns the simple name
- * (e.g., {@code int}) for primitive types, the unqualified class name
- * for class or interface types, or the display name of the component type
- * suffixed with the appropriate number of {@code []} pairs for array types.
- *
- * @return the human-readable name
+ * {@return a human-readable name for this {@code ClassDesc}}
*/
- default String displayName() {
+ String displayName() {
```