public @NotNull PsiElementVisitor asPsiVisitor() {
      return new PsiRecursiveElementVisitor() {
        @Override
        public void visitElement(@NotNull PsiElement element) {
          final var uElement = UastContextKt.toUElementOfExpectedTypes(element, OUR_EXPECTED_UAST_TYPES);
          if (uElement != null) {
            uElement.accept(MyAnonymousClassesNamesCollectingVisitor.this);
          }
          super.visitElement(element);
        }
      };
    }
public @NotNull PsiElementVisitor asPsiVisitor()