Arrays.stream(listenerClass.getDeclaredMethods()).
filter(m -> m.isAnnotationPresent(EventListener.class)).sequential().forEach(methodsWithAnnotation::add);
Set<Class<? extends EventBase>> eventClasses = new HashSet<>();
for (Method method : methodsWithAnnotation) {
EventListener annotation = method.getDeclaredAnnotation(EventListener.class);
Class<? extends EventBase> eventClass = annotation.event();
if (!eventClasses.contains(eventClass)) {
eventClasses.add(eventClass);
}
}