void (Map<PsiFile, PsiClass[]> result, PsiFile containingFile, PsiClass[] topLevelClasses) { PsiClass[] classes = result.get(containingFile); if (topLevelClasses != null) { if (classes != null) { topLevelClasses = ArrayUtil.mergeArrays(classes, topLevelClasses, PsiClass.ARRAY_FACTORY); } result.put(containingFile, topLevelClasses); } else { result.put(containingFile, classes); } }