code: private static Map<Key<?>, Binding<?>> gatherBindings(Injector injector) {
        
      Map<Key<?>, Binding<?>> dst = new HashMap<Key<?>, Binding<?>>();
      
      Injector current = injector;
      while (current != null) {
        dst.putAll(current.getBindings());
        current = current.getParent();
      }
      
      return dst;
    }
docs: Gathers Guice {@link Injector} bindings over the hierarchy.