Collection<LombokProblem> (@NotNull PsiAnnotation psiAnnotation) { final ProblemValidationSink problemBuilder = new ProblemValidationSink(); PsiMethod psiMethod = PsiTreeUtil.getParentOfType(psiAnnotation, PsiMethod.class); if (null != psiMethod) { final PsiClass containingClass = psiMethod.getContainingClass(); if (null != containingClass) { if (containingClass.isAnnotationType() || containingClass.isInterface() || containingClass.isRecord()) { problemBuilder.addErrorMessage("inspection.message.synchronized.legal.only.on.methods.in.classes.enums"); } else { if (psiMethod.hasModifierProperty(PsiModifier.ABSTRACT)) { problemBuilder.addErrorMessage("inspection.message.synchronized.legal.only.on.concrete.methods") .withLocalQuickFixes(() -> PsiQuickFixFactory.createModifierListFix(psiMethod, PsiModifier.ABSTRACT, false, false)); } else { validateReferencedField(problemBuilder, psiAnnotation, psiMethod, containingClass); } } } } return problemBuilder.getProblems(); }