/** * Checks that the given string is a valid internal class name or array type descriptor. * * @param version the class version. * @param name the string to be checked. * @param message the message to use in case of error. */ static void checkInternalName(final int version, final String name, final String message) { if (name == null || name.length() == 0) { throw new IllegalArgumentException(INVALID + message + MUST_NOT_BE_NULL_OR_EMPTY); } if (name.charAt(0) == '[') { checkDescriptor(version, name, false); } else { checkInternalClassName(version, name, message); } }
/** * Checks that the given string is a valid internal class name or array type descriptor. * * @param version the class version. * @param name the string to be checked. * @param message the message to use in case of error. */ static void checkInternalName(final int version, final String name, final String message) { if (name == null || name.length() == 0) { throw new IllegalArgumentException(INVALID + message + MUST_NOT_BE_NULL_OR_EMPTY); } if (name.charAt(0) == '[') { checkDescriptor(version, name, false); } else { checkInternalClassName(version, name, message); } }
checkInternalClassName(version, descriptor.substring(startPos + 1, endPos), null); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(INVALID_DESCRIPTOR + descriptor, e);
checkInternalClassName(version, descriptor.substring(startPos + 1, endPos), null); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(INVALID_DESCRIPTOR + descriptor, e);