boolean (@NotNull String builderClassName, @NotNull PsiClass psiClass, @NotNull ProblemSink problemSink) { final Optional<PsiClass> existingInnerBuilderClassOptional = PsiClassUtil.getInnerClassInternByName(psiClass, builderClassName); if (existingInnerBuilderClassOptional.isPresent()) { final PsiClass existingInnerBuilderClass = existingInnerBuilderClassOptional.get(); if (!validateInvalidAnnotationsOnBuilderClass(existingInnerBuilderClass, problemSink)) { return false; } final boolean isStatic = existingInnerBuilderClass.hasModifierProperty(PsiModifier.STATIC); final boolean isAbstract = existingInnerBuilderClass.hasModifierProperty(PsiModifier.ABSTRACT); if (!isStatic || !isAbstract) { final LombokProblem problem = problemSink.addErrorMessage("inspection.message.existing.builder.must.be.abstract.static.inner.class"); if (!isAbstract && !isStatic) { problem.withLocalQuickFixes(() -> LocalQuickFix.from(new AddAbstractAndStaticModifiersFix(existingInnerBuilderClass))); } else if (!isAbstract) { problem.withLocalQuickFixes( () -> PsiQuickFixFactory.createModifierListFix(existingInnerBuilderClass, PsiModifier.ABSTRACT, true, false)); } else { problem.withLocalQuickFixes( () -> PsiQuickFixFactory.createModifierListFix(existingInnerBuilderClass, PsiModifier.STATIC, true, false)); } return false; } } return true; }