mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8281671: Class.getCanonicalName spec should explicitly cover array classes
Reviewed-by: mchung
This commit is contained in:
parent
9ba0760cf8
commit
5ec7898dbf
2 changed files with 111 additions and 0 deletions
|
@ -1732,8 +1732,18 @@ public final class Class<T> implements java.io.Serializable,
|
|||
* <li>an array whose component type does not have a canonical name</li>
|
||||
* </ul>
|
||||
*
|
||||
* The canonical name for a primitive class is the keyword for the
|
||||
* corresponding primitive type ({@code byte}, {@code short},
|
||||
* {@code char}, {@code int}, and so on).
|
||||
*
|
||||
* <p>An array type has a canonical name if and only if its
|
||||
* component type has a canonical name. When an array type has a
|
||||
* canonical name, it is equal to the canonical name of the
|
||||
* component type followed by "{@code []}".
|
||||
*
|
||||
* @return the canonical name of the underlying class if it exists, and
|
||||
* {@code null} otherwise.
|
||||
* @jls 6.7 Fully Qualified Names and Canonical Names
|
||||
* @since 1.5
|
||||
*/
|
||||
public String getCanonicalName() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue