code: private static Class<?>[] getListenerGenericTypes(Class<?> listenerClass, Logger log) {
      List<Class<?>> configClasses = new ArrayList<Class<?>>();
      Type[] typeVars = listenerClass.getGenericInterfaces();
      if(typeVars != null) {
        for(Type interfaceClass : typeVars) {
          if(interfaceClass instanceof ParameterizedType) {
            if(((ParameterizedType) interfaceClass).getRawType() instanceof Class) {
              if(ConfigurationListener.class.isAssignableFrom((Class<?>) ((ParameterizedType) interfaceClass).getRawType())) {
                ParameterizedType pType = (ParameterizedType) interfaceClass;
                Type[] typeArgs = pType.getActualTypeArguments();
                if(typeArgs != null && typeArgs.length == 1 && typeArgs[0] instanceof Class) {
                  Class<?> type = (Class<?>) typeArgs[0];
                  if(type.isAnnotationPresent(CadmiumConfig.class)){
                    log.debug("Adding "+type+" to the configuration types interesting to "+listenerClass);
                    configClasses.add(type);
                  }
                }
              }
            }
          }
        }
      }
      return configClasses.toArray(new Class<?>[] {});
    }
docs: Gets a list of classes that the listenerClass is interesting in listening to.
  
  @param listenerClass
  @param log
  @return