boolean (@NotNull PsiField psiField, @NotNull ProblemSink builder, boolean isGetter) { final PsiClass psiClass = psiField.getContainingClass(); if (null != psiClass) { //cache signatures to speed up editing of big files, where getName goes in psi tree List<MethodSignatureBackedByPsiMethod> ownSignatures = CachedValuesManager.getCachedValue(psiClass, () -> { List<MethodSignatureBackedByPsiMethod> signatures = ContainerUtil.map(PsiClassUtil.collectClassMethodsIntern(psiClass), m -> MethodSignatureBackedByPsiMethod.create(m, PsiSubstitutor.EMPTY)); return new CachedValueProvider.Result<>(signatures, PsiModificationTracker.MODIFICATION_COUNT); }); final List<MethodSignatureBackedByPsiMethod> classMethods = new ArrayList<>(ownSignatures); final boolean isBoolean = PsiTypes.booleanType().equals(psiField.getType()); final AccessorsInfo accessorsInfo = AccessorsInfo.buildFor(psiField); final String fieldName = psiField.getName(); String accessorName = isGetter ? LombokUtils.toGetterName(accessorsInfo, fieldName, isBoolean) : LombokUtils.toSetterName(accessorsInfo, fieldName, isBoolean); int paramCount = isGetter ? 0 : 1; classMethods.removeIf(m -> m.getParameterTypes().length != paramCount || !accessorName.equals(m.getName())); classMethods.removeIf(definedMethod -> PsiAnnotationSearchUtil.isAnnotatedWith(definedMethod.getMethod(), LombokClassNames.TOLERATE)); if (!classMethods.isEmpty()) { builder.addWarningMessage("inspection.message.not.generated.s.method.with.similar.name.s.already.exists", accessorName, accessorName); return false; } } return true; }