System.out.println("eventType: " + eventType.getClass() + " -- " + eventType);
System.out.println("method: " + method.getClass() + " -- " + method);
System.out.println("returnType: " + returnType.getClass() + " -- " + returnType);
MetaParameterizedType parameterizedType = returnType.getParameterizedType();
if (parameterizedType == null) {
throw new GenerationException("The method 'getAssociatedType()' in the event [" + eventType.getName()
+ "] does not return Type<? extends EventHandler>..");
}
System.out.println("parameterizedType: " + parameterizedType.getClass() + " -- " + parameterizedType);
MetaType[] argTypes = parameterizedType.getTypeParameters();
if ((argTypes.length != 1) && argTypes[0] instanceof MetaClass
&& !((MetaClass) argTypes[0]).isAssignableTo(EventHandler.class)) {
throw new GenerationException("The method 'getAssociatedType()' in the event [" + eventType.getName()
+ "] does not return Type<? extends EventHandler>..");
}