public static void registerAnnotatedListeners(EventListenerRegistry registry, Object targetObject)
{
for (Method targetMethod : targetObject.getClass().getDeclaredMethods())
{
OnEvent onEvent = targetMethod.getAnnotation(OnEvent.class);
if (onEvent != null)
{
registerEventListener(registry, onEvent.value(), targetObject, targetMethod);
}
}
}