boolean (@NotNull PsiClass psiClass, Collection<BuilderInfo> builderInfos, @NotNull ProblemSink problemSink) { if (PsiAnnotationSearchUtil.isAnnotatedWith(psiClass, LombokClassNames.NO_ARGS_CONSTRUCTOR) && PsiAnnotationSearchUtil.isNotAnnotatedWith(psiClass, LombokClassNames.ALL_ARGS_CONSTRUCTOR)) { if (PsiAnnotationSearchUtil.isAnnotatedWith(psiClass, LombokClassNames.REQUIRED_ARGS_CONSTRUCTOR)) { Collection<PsiField> requiredFields = getNoArgsConstructorProcessor().getRequiredFields(psiClass); List<PsiType> requiredTypes = ContainerUtil.map(requiredFields, PsiField::getType); List<PsiType> psiTypes = ContainerUtil.map(builderInfos, BuilderInfo::getFieldType); if (requiredTypes.equals(psiTypes)) { return true; } } Optional<PsiMethod> existingConstructorForParameters = getExistingConstructorForParameters(psiClass, builderInfos); if (existingConstructorForParameters.isPresent()) { return true; } if (builderInfos.isEmpty() && PsiClassUtil.collectClassConstructorIntern(psiClass).isEmpty()) { return true; } problemSink.addErrorMessage("inspection.message.lombok.builder.needs.proper.constructor.for.this.class"); return false; } return true; }