// standalone entity listeners
EntityListeners entityListeners = entityType.getAnnotation(EntityListeners.class);
if (entityListeners != null) {
for (Class<?> listenerClass : entityListeners.value()) {
MetaClass listenerMetaClass = MetaClassFactory.get(listenerClass);
for (MetaMethod callback : listenerMetaClass.getMethodsAnnotatedWith(eventType)) {
if (callback.getParameters().length != 1) {
throw new GenerationException("JPA lifecycle listener method " + callback.getName() + " has " +
callback.getParameters().length + " parameters (expected 1)");
}
if (!callback.getParameters()[0].getType().isAssignableFrom(entityType)) {