private static void processClassHierarchy(UClass uClass, RefClass refClass, Set<? super Module> modules) {
    LinkedHashSet<UClass> superClasses = new LinkedHashSet<>();
    if (refClass == null) {
      processSupers(uClass, superClasses);
    }
    else {
      for (RefClass aClass : refClass.getBaseClasses()) {
        UClass superClass = aClass.getUastElement();
        if (superClass != null) {
          superClasses.add(superClass);
        }
      }
    }
    for (PsiClass superClass : superClasses) {
      Set<Module> onModules = getAllPossibleWhatModules(superClass);
      if (onModules != null) modules.addAll(onModules);
    }
  }
private static void processClassHierarchy(UClass uClass, RefClass refClass, Set<? super Module> modules)