diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index e0190ddab5a..3e61b179e7c 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -2844,10 +2844,16 @@ assertEquals("[x, y, z]", pb.command().toString()); * Such a resolution, as specified in JVMS {@jvms 5.4.3.1}, attempts to locate and load the class, * and then determines whether the class is accessible to this lookup object. *
+ * For a class or an interface, the name is the {@linkplain ClassLoader##binary-name binary name}. + * For an array class of {@code n} dimensions, the name begins with {@code n} occurrences + * of {@code '['} and followed by the element type as encoded in the + * {@linkplain Class##nameFormat table} specified in {@link Class#getName}. + *
* The lookup context here is determined by the {@linkplain #lookupClass() lookup class}, * its class loader, and the {@linkplain #lookupModes() lookup modes}. * - * @param targetName the fully qualified name of the class to be looked up. + * @param targetName the {@linkplain ClassLoader##binary-name binary name} of the class + * or the string representing an array class * @return the requested class. * @throws SecurityException if a security manager is present and it * refuses access