docs: public void register(Object object) {
      if (object == null) {
        throw new NullPointerException("Object to register must not be null.");
      }
      enforcer.enforce(this);
  
      Map<Class<?>, EventProducer> foundProducers = handlerFinder.findAllProducers(object);
      for (Class<?> type : foundProducers.keySet()) {
  
        final EventProducer producer = foundProducers.get(type);
        EventProducer previousProducer = producersByType.putIfAbsent(type, producer);
        //checking if the previous producer existed
        if (previousProducer != null) {
          throw new IllegalArgumentException("Producer method for type " + type
            + " found on type " + producer.target.getClass()
            + ", but already registered by type " + previousProducer.target.getClass() + ".");
        }
        Set<EventHandler> handlers = handlersByType.get(type);
        if (handlers != null && !handlers.isEmpty()) {
          for (EventHandler handler : handlers) {
            dispatchProducerResultToHandler(handler, producer);
          }
        }
      }
  
      Map<Class<?>, Set<EventHandler>> foundHandlersMap = handlerFinder.findAllSubscribers(object);
      for (Class<?> type : foundHandlersMap.keySet()) {
        Set<EventHandler> handlers = handlersByType.get(type);
        if (handlers == null) {
          //concurrent put if absent
          Set<EventHandler> handlersCreation = new CopyOnWriteArraySet<EventHandler>();
          handlers = handlersByType.putIfAbsent(type, handlersCreation);
          if (handlers == null) {
              handlers = handlersCreation;
          }
        }
        final Set<EventHandler> foundHandlers = foundHandlersMap.get(type);
        handlers.addAll(foundHandlers);
      }
  
      for (Map.Entry<Class<?>, Set<EventHandler>> entry : foundHandlersMap.entrySet()) {
        Class<?> type = entry.getKey();
        EventProducer producer = producersByType.get(type);
        if (producer != null && producer.isValid()) {
          Set<EventHandler> foundHandlers = entry.getValue();
          for (EventHandler foundHandler : foundHandlers) {
            if (!producer.isValid()) {
              break;
            }
            if (foundHandler.isValid()) {
              dispatchProducerResultToHandler(foundHandler, producer);
            }
          }
        }
      }
    }