if (handlerAnnotation != null) {
definedPayload = handlerAnnotation.eventType();
} else {
EventHandler legacyAnnotation = member.getAnnotation(EventHandler.class);
if (legacyAnnotation != null) {
definedPayload = legacyAnnotation.eventType();
}
}
return definedPayload == Void.class ? null : definedPayload;
}