return l;
}
protected static void testListenerMethodValidity(Method m, Class<?> allowedParameter, String annotationName) {
if (m.getParameterTypes().length != 1 || !m.getParameterTypes()[0].isAssignableFrom(allowedParameter))
throw new IncorrectListenerException("Methods annotated with " + annotationName + " must accept exactly one parameter, of assignable from type " + allowedParameter.getName());
if (!m.getReturnType().equals(void.class))
throw new IncorrectListenerException("Methods annotated with " + annotationName + " should have a return type of void.");
}