code: public final synchronized void addListener(EventListener l) {
          if(l ==null) {
              throw new IllegalArgumentException("Listener " + l +
                                                 " is null");
          }
          if(listeners == EMPTY_LISTENERS) {
              listeners = new EventListener[1];
              listeners[0] = l;
          }
          else {
              int i = listeners.length;
              EventListener[] tmp = new EventListener[i+1];
              System.arraycopy(listeners, 0, tmp, 0, i);
  
              tmp[i] = l;
              listeners = tmp;
          }
      }
docs: Add the listener as a listener to the list.
  @param l the listener to be added