public <E extends JibEvent> Containerizer addEventHandler(
      Class<E> eventType, Consumer<? super E> eventConsumer) {
    eventHandlersBuilder.add(eventType, eventConsumer);
    return this;
  }
Adds the {@code eventConsumer} to handle the {@link JibEvent} with class {@code eventType}. 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 eventType}
@return this
jib-core/src/main/java/com/google/cloud/tools/jib/api/Containerizer.java