void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { final PsiMethod method = ObjectUtils.tryCast(element.getParent(), PsiMethod.class); if (method == null) return; final PsiTypeElement returnTypeElement = method.getReturnTypeElement(); if (returnTypeElement == null) return; PsiModifierList modifiers = method.getModifierList(); for (String modifier : PsiModifier.MODIFIERS) { if (!MODIFIERS_ALLOWED_ON_CONSTRUCTORS.contains(modifier)) { modifiers.setModifierProperty(modifier, false); } } returnTypeElement.delete(); }