code: Object dispatchEvent(EventRef event, Object [] args)
                           throws IllegalAccessException,IllegalArgumentException,
                                  InvocationTargetException
      {
          ensureControl();
  
          //
          // Translate the EventRef back to an actual event method on the ControlInterface
          //
          Class controlInterface = getControlInterface();
          Method method = event.getEventMethod(controlInterface);
  
          //
          // Locate the target of the event
          //
          Object eventTarget = null;
          if (method.getDeclaringClass().isAssignableFrom(_control.getClass()))
          {
              //
              // If the control implementation implements that EventSet interface, then 
              // dispatch the event directly to it, and allow it do make the decision about 
              // how/when to dispatch to any external listeners (via a @Client notifier 
              // instance)
              //
              eventTarget = _control;
          }
          else
          {
              //
              // The associated control implementation does not directly handle the event,
              // so find the event notifier instance for the EventSet interface associated 
              // with the method.
              //
              eventTarget = _notifiers.get(method.getDeclaringClass());
              if (eventTarget == null)
                  throw new IllegalArgumentException("No event notifier found for " + event);
          }
  
          //
          // Dispatch the event
          //
          return method.invoke(eventTarget, args);
      }
docs: /* package