code: private List<Class<?>> getAllInternalListeners() {
      Class<?> clazz = entityClass;
      List<Class<?>> allListeners = new ArrayList<>();
      boolean stop = false;
      while (!stop) {
        allListeners.add(0, clazz);
        boolean excludeSuperClassListeners = clazz
            .isAnnotationPresent(ExcludeSuperclassListeners.class);
        clazz = clazz.getSuperclass();
        stop = excludeSuperClassListeners || clazz == null
            || !clazz.isAnnotationPresent(MappedSuperClass.class);
      }
      return allListeners;
  
    }
docs: Traverses up the entity class hierarchy and returns the list of all classes that may
  potentially have callback listeners.
  
  @return all internal callback listeners