code: private <E extends Event> EventHandler<E> buildEventHandler(final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass) throws CoreException {
  
          EventHandler<E> eventHandler = null;
          // Build the mouse handler instance
          if (adapterClass.isAssignableFrom(this.getClass())) {
              eventHandler = wrapbuildHandler(this, adapterClass, handlerClass);
          } else {
              throw new CoreException(this.getClass().getName() + " must implement " + adapterClass.getName() + " interface");
          }
          return eventHandler;
      }
docs: Build an event handler by reflection using the Controller object as eventAdapter.
  
  @param adapterClass the event adapter class to used
  @param handlerClass the event handler class to used
  
  @return the required event handler
  
  @param <E> the Event type to manage
  
  @throws CoreException if the local api contract is not respected