Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-6361826: (reflect) provide method for mapping strings to class object for primitive types #14743

Closed
wants to merge 7 commits into from
5 changes: 3 additions & 2 deletions src/java.base/share/classes/java/lang/Class.java
Original file line number Diff line number Diff line change
@@ -438,8 +438,9 @@ private static Class<?> forName(String className, Class<?> caller)
* If {@code name} denotes a primitive type or void, for example {@code I},
* an attempt will be made to locate a user-defined class in the unnamed package
* whose name is {@code I} instead.
* To obtain a {@code Class} object for a named primitive type, use
* {@link #forPrimitiveName(String)}.
* To obtain a {@code Class} object for a named primitive type
* such as {@code int} or {@code long} use {@link
* #forPrimitiveName(String)}.
*
* <p> To obtain the {@code Class} object associated with an array class,
* the name consists of one or more {@code '['} representing the depth