code: public HandlerRegistration register(Provider<?> provider) {
          final String typeName = provider.getType().getName();
          providers.put(typeName, provider);
  
          return new HandlerRegistration() {
              @Override
              public void removeHandler() {
                  providers.remove(typeName);
              }
          };
      }
docs: Register a {@link Provider}.
  
  @param provider  the provider to register
  
  @return  the {@link HandlerRegistration} object, capable of cancelling this registration