public <E extends JibEvent> Builder add(Class<E> eventType, Consumer<? super E> eventConsumer) {
      handlers.put(eventType, new Handler<>(eventType, eventConsumer));
      return this;
    }
Adds the {@code eventConsumer} to handle the {@link JibEvent} with class {@code eventClass}.
The order in which handlers are added is the order in which they are called when the event is
dispatched.

<p><b>Note: Implementations of {@code eventConsumer} must be thread-safe.</b>

@param eventType the event type that {@code eventConsumer} should handle
@param eventConsumer the event handler
@param <E> the type of {@code eventClass}
@return this
jib-core/src/main/java/com/google/cloud/tools/jib/event/EventHandlers.java