code: private void transitiveDeps(int depth) throws IOException {
          Stream<Location> deps = archives.stream()
                                          .flatMap(Archive::getDependencies);
  
          Deque<Location> unresolved = deps.collect(Collectors.toCollection(LinkedList::new));
          ConcurrentLinkedDeque<Location> deque = new ConcurrentLinkedDeque<>();
          do {
              Location target;
              while ((target = unresolved.poll()) != null) {
                  if (finder.isParsed(target))
                      continue;
  
                  Archive archive = configuration.findClass(target).orElse(null);
                  if (archive != null) {
                      archives.add(archive);
  
                      String name = target.getName();
                      Set<Location> targets = apiOnly
                              ? finder.parseExportedAPIs(archive, name)
                              : finder.parse(archive, name);
  
                      // build unresolved dependencies
                      targets.stream()
                             .filter(t -> !finder.isParsed(t))
                             .forEach(deque::add);
                  }
              }
              unresolved = deque;
              deque = new ConcurrentLinkedDeque<>();
          } while (!unresolved.isEmpty() && depth-- > 0);
      }
docs: /*
  Recursively analyze the class dependences