/** * Checks the type arguments in a class type signature. * * @param signature a string containing the signature that must be checked. * @param startPos index of first character to be checked. * @return the index of the first character after the checked part. */ private static int checkTypeArguments(final String signature, final int startPos) { // From https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.9.1: // TypeArguments: // < TypeArgument TypeArgument* > int pos = startPos; pos = checkChar('<', signature, pos); pos = checkTypeArgument(signature, pos); while (getChar(signature, pos) != '>') { pos = checkTypeArgument(signature, pos); } return pos + 1; }
/** * Checks the type arguments in a class type signature. * * @param signature a string containing the signature that must be checked. * @param startPos index of first character to be checked. * @return the index of the first character after the checked part. */ private static int checkTypeArguments(final String signature, final int startPos) { // From https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.9.1: // TypeArguments: // < TypeArgument TypeArgument* > int pos = startPos; pos = checkChar('<', signature, pos); pos = checkTypeArgument(signature, pos); while (getChar(signature, pos) != '>') { pos = checkTypeArgument(signature, pos); } return pos + 1; }
/** * Checks the type arguments in a class type signature. * * @param signature * a string containing the signature that must be checked. * @param pos * index of first character to be checked. * @return the index of the first character after the checked part. */ private static int checkTypeArguments(final String signature, int pos) { // TypeArguments: // < TypeArgument+ > pos = checkChar('<', signature, pos); pos = checkTypeArgument(signature, pos); while (getChar(signature, pos) != '>') { pos = checkTypeArgument(signature, pos); } return pos + 1; }