code: @SuppressWarnings("PMD.DataflowAnomalyAnalysis")
      public void invoke(EventBase<?> event) throws Throwable {
          // ADAPT VERBOSEHANDLERREFERENCE TO ANY CHANGES MADE HERE
          switch (method.type().parameterCount()) {
          case 0:
              // No parameters
              method.invoke();
              break;
  
          case 1:
              // Event parameter
              method.invoke(event);
              break;
  
          case 2:
              // Event and channel
              Class<?> channelParam = method.type().parameterType(1);
              for (Channel channel : event.channels()) {
                  if (channelParam.isAssignableFrom(channel.getClass())) {
                      method.invoke(event, channel);
                  }
              }
              break;
  
          default:
              throw new IllegalStateException("Handle not usable");
          }
      }
docs: Invoke the handler with the given event as parameter.
  
  @param event the event