code: private Set<T> getTransitiveDeps(T server) {
      Set<T> result = new HashSet<>();
      Deque<T> queue = new ArrayDeque<>();
      queue.add(server);
      while (!queue.isEmpty()) {
        Set<Class<? extends Server>> deps = queue.pop().getDependencies();
        if (deps == null) {
          continue;
        }
        for (Class<? extends Server> clazz : deps) {
          T dep = mRegistry.get(clazz);
          if (dep == null) {
            continue;
          }
          if (dep.equals(server)) {
            throw new RuntimeException("Dependency cycle encountered");
          }
          if (result.contains(dep)) {
            continue;
          }
          queue.add(dep);
          result.add(dep);
        }
      }
      return result;
    }
docs: Computes a transitive closure of the {@link Server} dependencies.
  
  @param server the {@link Server} to compute transitive dependencies for
  @return the transitive dependencies