code: private void notifyListener(GerritEventListener listener, GerritEvent event) {
          logger.trace("Notifying listener {} of event {}", listener, event);
          try {
              logger.trace("Reflecting closest method");
              Method method = listener.getClass().getMethod("gerritEvent", event.getClass());
              method.invoke(listener, event);
          } catch (IllegalAccessException ex) {
              logger.debug("Not allowed to invoke the reflected method. Calling default.", ex);
              listener.gerritEvent(event);
          } catch (IllegalArgumentException ex) {
              logger.debug("Not allowed to invoke the reflected method with specified parameter (REFLECTION BUG). "
                 + "Calling default.", ex);
              listener.gerritEvent(event);
          } catch (InvocationTargetException ex) {
              logger.error("When notifying listener: {} about event: {}", listener, event);
              logger.error("Exception thrown during event handling.", ex);
          } catch (NoSuchMethodException ex) {
              logger.debug("No apropriate method found during reflection. Calling default.", ex);
              listener.gerritEvent(event);
          } catch (SecurityException ex) {
              logger.debug("Not allowed to reflect/invoke a method on this listener (DESIGN BUG). Calling default", ex);
              listener.gerritEvent(event);
          }
      }
docs: Sub method of {@link #notifyListeners(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent) }.
  This is where most of the reflection magic in the event notification is done.
  
  @param listener the listener to notify
  @param event    the event.