code: private static int checkIdentifier(final String signature, int pos) {
          if (!Character.isJavaIdentifierStart(getChar(signature, pos))) {
              throw new IllegalArgumentException(signature
                      + ": identifier expected at index " + pos);
          }
          ++pos;
          while (Character.isJavaIdentifierPart(getChar(signature, pos))) {
              ++pos;
          }
          return pos;
      }
docs: Checks an identifier.
  
  @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.