changeset 53744:411969c7b5df jep-334

additional documentation
author vromero
date Wed, 05 Dec 2018 22:40:40 -0500
parents 44346d4a2266
children 9fdcbc01f6ab
files src/java.base/share/classes/java/lang/constant/ConstantUtils.java
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/constant/ConstantUtils.java	Wed Dec 05 21:01:13 2018 -0500
+++ b/src/java.base/share/classes/java/lang/constant/ConstantUtils.java	Wed Dec 05 22:40:40 2018 -0500
@@ -40,6 +40,14 @@
 
     private static final Set<String> pointyNames = Set.of("<init>", "<clinit>");
 
+    /**
+     * Validates the correctness of a binary class name. In particular checks for the presence of
+     * invalid characters in the name.
+     *
+     * @param name the class name
+     * @return the class name passed if valid
+     * @throws IllegalArgumentException if the class name is invalid
+     */
     static String validateBinaryClassName(String name) {
         for (int i=0; i<name.length(); i++) {
             char ch = name.charAt(i);
@@ -50,9 +58,11 @@
     }
 
     /**
-     * validates a member name
+     * Validates a member name
+     *
      * @param name the name of the member
      * @return the name passed if valid
+     * @throws IllegalArgumentException if the member name is invalid
      */
     public static String validateMemberName(String name) {
         requireNonNull(name);