On Wed, 14 Jun 2023 16:28:31 GMT, Mandy Chung <mch...@openjdk.org> wrote:

>> This might wish to refer to "classes that can be described nominally", but 
>> same might be said for hidden classes as well. So your suggestion is better.
>
> What about:
> 
> 
>      * This is not a strict inverse of {@link #forName(String) forName}.
>      * Distinct classes which share a common name but have different class
>      * loaders will have the identical name. {@linkplain #isHidden() Hidden}
>      * classes cannot be discovered by {@code forName}.

On a second thought, these are all `getName` results that cannot be parsed by 
`forName`:
 - Primitive type names
 - Hidden class names
 - Arrays whose component types are hidden classes

I suggest:

     * This is not a strict inverse of {@link #forName(String) forName(String)}.
     * Distinct classes which share a common name but have different class
     * loaders will have the identical name. {@linkplain #isPrimitive()
     * Primitive types}, {@linkplain #isHidden() hidden} classes, and arrays
     * with hidden class as element types cannot be discovered by {@code 
forName}.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14411#discussion_r1230335235

Reply via email to