@Contract(mutates = "param2")
  public static boolean collectJvmIdentifiers(@NotNull String str, @NotNull IdConsumer partsConsumer) {
    if (str.isEmpty()) return false;

    if (str.charAt(str.length() - 1) == ';' || str.charAt(0) == '(') {
      // probably field descriptor, e.g. [[Ljava/lang/String; or [B or S
      // also it may be Signature, e.g.
      // Ljava/util/Map<[Ljava/lang/String;Ljava/util/List<Ljava/util/List<+Ljava/util/Comparator<Ljava/lang/String;>;>;>;>;
      // It doesn't make sense to take the strings out of it recursively, so instead parts between 'L' and (';' or '<') are searched
      int current = 0;
      int start;
      outer:
      while (current < str.length()) {
        char firstChar = str.charAt(current);
        if (firstChar == 'L') {
          current++;
          start = current;
          while (current < str.length()) {
            char ch = str.charAt(current);
            current++;
            if (ch == ';' || ch == '<') {
              if (!collectSlashSeparated(str, start, current - 1, partsConsumer)) {
                return false;
              }
              continue outer;
            }
          }
        }
        current++;
      }
      if (current == str.length()) {
        return true;
      }
    }

    return collectSlashSeparated(str, 0, str.length(), partsConsumer);
  }
@Contract(mutates = "param2")
  public static boolean collectJvmIdentifiers(@NotNull String str, @NotNull IdConsumer partsConsumer)