private static String parseMethodViaGenericSignature(
      final String signature,
      final PsiMethodStubImpl stub,
      final List<String> args,
      final List<String> throwables)
      throws ClsFormatException {
    StringCharacterIterator iterator = new StringCharacterIterator(signature);
    SignatureParsing.parseTypeParametersDeclaration(iterator, stub);

    if (iterator.current() != '(') {
      throw new ClsFormatException();
    }
    iterator.next();

    while (iterator.current() != ')' && iterator.current() != CharacterIterator.DONE) {
      args.add(SignatureParsing.parseTypeString(iterator));
    }

    if (iterator.current() != ')') {
      throw new ClsFormatException();
    }
    iterator.next();

    String returnType = SignatureParsing.parseTypeString(iterator);

    while (iterator.current() == '^') {
      iterator.next();
      throwables.add(SignatureParsing.parseTypeString(iterator));
    }

    return returnType;
  }
 @NotNull
 private static TypeInfo fieldType(String desc, String signature) {
   if (signature != null) {
     try {
       return TypeInfo.fromString(
           SignatureParsing.parseTypeString(new StringCharacterIterator(signature, 0)));
     } catch (ClsFormatException e) {
       return fieldTypeViaDescription(desc);
     }
   } else {
     return fieldTypeViaDescription(desc);
   }
 }