boolean (@NotNull PsiClass psiClass, @NotNull ProblemSink builder) { if (psiClass.isRecord() || PsiAnnotationSearchUtil.isAnnotatedWith(psiClass, LombokClassNames.ALL_ARGS_CONSTRUCTOR, LombokClassNames.VALUE, LombokClassNames.BUILDER)) { return true; } final Collection<PsiField> constructorParameters = filterFields(psiClass); if (PsiAnnotationSearchUtil.isAnnotatedWith(psiClass, LombokClassNames.REQUIRED_ARGS_CONSTRUCTOR, LombokClassNames.DATA)) { final Collection<PsiField> requiredConstructorParameters = getRequiredArgsConstructorProcessor().getRequiredFields(psiClass); if (constructorParameters.size() == requiredConstructorParameters.size()) { return true; } } final Collection<PsiMethod> classConstructors = PsiClassUtil.collectClassConstructorIntern(psiClass); boolean constructorExists = false; for (PsiMethod classConstructor : classConstructors) { if (classConstructor.getParameterList().getParametersCount() == constructorParameters.size()) { constructorExists = true; break; } } if (!constructorExists) { builder.addWarningMessage("inspection.message.wither.needs.constructor.for.all.fields.d.parameters", constructorParameters.size()); builder.markFailed(); } return constructorExists; }