private @NotNull Map<String, Iterable<ResultWithContext>> findEnumeratedDeclarations() {
    MultiMap<String, PsiClass> ownClasses = MultiMap.create();
    MultiMap<String, PsiImportStatement> typeImports = MultiMap.create();
    MultiMap<String, PsiImportStaticStatement> staticImports = MultiMap.create();

    for (PsiClass psiClass : getClasses()) {
      if (psiClass instanceof PsiImplicitClass) continue;
      String name = psiClass.getName();
      if (name != null) {
        ownClasses.putValue(name, psiClass);
      }
    }
    for (PsiImportStatement anImport : getImportStatements()) {
      if (!anImport.isOnDemand()) {
        String qName = anImport.getQualifiedName();
        if (qName != null) {
          typeImports.putValue(StringUtil.getShortName(qName), anImport);
        }
      }
    }
    for (PsiImportStaticStatement staticImport : ContainerUtil.append(getImplicitImportStaticStatements(), getImportStaticStatements())) {
      String name = staticImport.getReferenceName();
      if (name != null) {
        staticImports.putValue(name, staticImport);
      }
    }

    Map<String, Iterable<ResultWithContext>> result = new LinkedHashMap<>();
    for (String name : ContainerUtil.newLinkedHashSet(
      ContainerUtil.concat(ownClasses.keySet(), typeImports.keySet(), staticImports.keySet()))) {
      NotNullLazyValue<Iterable<ResultWithContext>> lazy =
        NotNullLazyValue.volatileLazy(() -> findExplicitDeclarations(name, ownClasses, typeImports, staticImports));
      result.put(name, () -> lazy.getValue().iterator());
    }
    return result;
  }
private @NotNull Map<String, Iterable<ResultWithContext>> findEnumeratedDeclarations()