protected void configureEventHandlers() {
MapBinder<String, EventHandler> eventBinder =
MapBinder.newMapBinder(binder(), String.class, EventHandler.class);
for (Class<? extends EventHandler> clazz : EventHandlerLoader.getClasses()) {
if (clazz.isAnnotationPresent(HandlerTarget.class)) {
HandlerTarget targetAnnotation = clazz.getAnnotation(HandlerTarget.class);
eventBinder.addBinding(targetAnnotation.value()).to(clazz).asEagerSingleton();
}
}
}