code: public static <L> void addEventListener(final Object eventSource, final Class<L> listenerType, final L listener) {
          try {
              MethodUtils.invokeMethod(eventSource, "add" + listenerType.getSimpleName(), listener);
          } catch (final NoSuchMethodException e) {
              throw new IllegalArgumentException("Class " + eventSource.getClass().getName()
                      + " does not have a public add" + listenerType.getSimpleName()
                      + " method which takes a parameter of type " + listenerType.getName() + ".");
          } catch (final IllegalAccessException e) {
              throw new IllegalArgumentException("Class " + eventSource.getClass().getName()
                      + " does not have an accessible add" + listenerType.getSimpleName ()
                      + " method which takes a parameter of type " + listenerType.getName() + ".");
          } catch (final InvocationTargetException e) {
              throw new RuntimeException("Unable to add listener.", e.getCause());
          }
      }
docs: Adds an event listener to the specified source.  This looks for an "add" method corresponding to the event
  type (addActionListener, for example).
  @param eventSource   the event source
  @param listenerType  the event listener type
  @param listener      the listener
  @param <L>           the event listener type
  
  @throws IllegalArgumentException if the object doesn't support the listener type