code: private void configureCustomTypes() {
          // empty binding is required in any case
          final Multibinder<OObjectSerializer> typesBinder =
                  Multibinder.newSetBinder(binder(), OObjectSerializer.class);
          if (!customTypes.isEmpty()) {
              for (Class<? extends OObjectSerializer> type : customTypes) {
                  bind(type).in(Singleton.class);
                  typesBinder.addBinding().to(type);
              }
          }
      }
docs: Binds registered custom types as guice singletons and register them with multibinder.