code: void visitDependences(Archive source, Visitor v, Type level) {
          if (level == Type.SUMMARY) {
              final Dependences result = results.get(source);
              final Set<Archive> reqs = result.requires();
              Stream<Archive> stream = reqs.stream();
              if (reqs.isEmpty()) {
                  if (hasDependences(source)) {
                      // If reqs.isEmpty() and we have dependences, then it means
                      // that the dependences are from 'source' onto itself.
                      stream = Stream.of(source);
                  }
              }
              stream.sorted(Comparator.comparing(Archive::getName))
                    .forEach(archive -> {
                        Profile profile = result.getTargetProfile(archive);
                        v.visitDependence(source.getName(), source,
                                          profile != null ? profile.profileName()
                                                          : archive.getName(), archive);
                    });
          } else {
              Dependences result = results.get(source);
              if (level != type) {
                  // requesting different level of analysis
                  result = new Dependences(source, level);
                  source.visitDependences(result);
              }
              result.dependencies().stream()
                    .sorted(Comparator.comparing(Dep::origin)
                                      .thenComparing(Dep::target))
                    .forEach(d -> v.visitDependence(d.origin(), d.originArchive(),
                                                    d.target(), d.targetArchive()));
          }
      }
docs: Visit the dependencies of the given source.
  If the requested level is SUMMARY, it will visit the required archives list.