@Override
  @SuppressWarnings("unchecked")
  public void postLoad(Class<?>[] classes) {
    for (Class<?> clazz : classes) {
      if (log.isDebugEnabled()) {
        log.debug("Loading class " + clazz.getName());
      }

      if (!isValidClass(clazz)) {
        continue;
      }

      if (ClassUtils.isSubclass(clazz, Language.class)) {
        Class<? extends Language> language = (Class<? extends Language>) clazz;
        if (language != null) {
          try {
            handler.registerLanguage(language.newInstance());
          } catch (Exception e) {
            log.error("Registering " + language.getName(), e);
          }
        }
      }
    }

    super.postLoad(classes);

    log.info("Loaded " + handler.size() + " custom message handlers.");
  }
  @Override
  public void preUnload(Class<?>[] classes) {
    if (log.isDebugEnabled()) {
      for (Class<?> clazz : classes) {
        log.debug("Unload language " + clazz.getName());
      }
    }

    super.preUnload(classes);

    handler.clear();
  }