Collection<PsiField> (@NotNull PsiClass psiClass) { final Collection<PsiMethod> classMethods = PsiClassUtil.collectClassMethodsIntern(psiClass); filterToleratedElements(classMethods); SetterFieldProcessor fieldProcessor = getSetterFieldProcessor(); final Collection<PsiField> setterFields = new ArrayList<>(); for (PsiField psiField : psiClass.getFields()) { boolean createSetter = true; PsiModifierList modifierList = psiField.getModifierList(); if (null != modifierList) { //Skip final fields. createSetter = !modifierList.hasModifierProperty(PsiModifier.FINAL); //Skip static fields. createSetter &= !modifierList.hasModifierProperty(PsiModifier.STATIC); //Skip fields having Setter annotation already createSetter &= PsiAnnotationSearchUtil.isNotAnnotatedWith(psiField, fieldProcessor.getSupportedAnnotationClasses()); //Skip fields that start with $ createSetter &= !psiField.getName().startsWith(LombokUtils.LOMBOK_INTERN_FIELD_MARKER); //Skip fields if a method with same name already exists final Collection<String> methodNames = fieldProcessor.getAllSetterNames(psiField, PsiTypes.booleanType().equals(psiField.getType())); for (String methodName : methodNames) { createSetter &= !PsiMethodUtil.hasSimilarMethod(classMethods, methodName, 1); } } if (createSetter) { setterFields.add(psiField); } } return setterFields; }