Collection<PsiField> (@NotNull PsiClass psiClass) { Collection<PsiField> witherFields = new ArrayList<>(); for (PsiField psiField : psiClass.getFields()) { boolean createWither = true; PsiModifierList modifierList = psiField.getModifierList(); if (null != modifierList) { // Skip static fields. createWither = !modifierList.hasModifierProperty(PsiModifier.STATIC); // Skip final fields that are initialized and not annotated with @Builder.Default createWither &= !(modifierList.hasModifierProperty(PsiModifier.FINAL) && psiField.hasInitializer() && PsiAnnotationSearchUtil.findAnnotation(psiField, BUILDER_DEFAULT_ANNOTATION) == null); // Skip fields that start with $ createWither &= !psiField.getName().startsWith(LombokUtils.LOMBOK_INTERN_FIELD_MARKER); // Skip fields having Wither annotation already createWither &= !PsiAnnotationSearchUtil.isAnnotatedWith(psiField, LombokClassNames.WITHER, LombokClassNames.WITH); } if (createWither) { witherFields.add(psiField); } } return witherFields; }