void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiTypeElement typeElement)) { return; } final PsiElementFactory factory = JavaPsiFacade.getInstance(project).getElementFactory(); final PsiClassType type = factory.createTypeByFQClassName(CommonClassNames.JAVA_LANG_RUNTIME_EXCEPTION); final PsiTypeElement newTypeElement = factory.createTypeElement(type); typeElement.replace(newTypeElement); }