public void dispatch(JibEvent jibEvent) {
    if (handlers.isEmpty()) {
      return;
    }
    handlers.get(JibEvent.class).forEach(handler -> handler.handle(jibEvent));
    handlers.get(jibEvent.getClass()).forEach(handler -> handler.handle(jibEvent));
  }
Dispatches {@code jibEvent} to all the handlers that can handle it.

@param jibEvent the {@link JibEvent} to dispatch
jib-core/src/main/java/com/google/cloud/tools/jib/event/EventHandlers.java