public static @NotNull Iterable<JvmElement> getImmediatelyContainingElements(@NotNull PsiElement place) {
    List<JvmDeclarationSearcher> extensions = JvmDeclarationSearcher.EP.allForLanguage(place.getLanguage());
    if (extensions.isEmpty()) {
      return Collections.emptyList();
    }

    PsiElement current = place;
    while (current != null) {
      Iterator<JvmElement> iterator = iterateDeclarations(current, extensions);
      if (iterator.hasNext()) {
        return () -> iterator;
      }
      current = current.getParent();
    }

    return Collections.emptyList();
  }
public static @NotNull Iterable<JvmElement> getImmediatelyContainingElements(@NotNull PsiElement place)