String (@NotNull PsiField field, @NotNull PsiType componentType, @Nullable FieldAccessorCandidate fieldAccessorCandidate) { PsiAnnotation[] fieldAnnotations = field.getAnnotations(); String fieldAnnotationsText = Arrays.stream(fieldAnnotations) .filter(anno -> !AnnotationTargetUtil.isTypeAnnotation(anno)) .map(PsiAnnotation::getText).collect(Collectors.joining(" ")); String annotationsText = fieldAnnotationsText.isEmpty() ? fieldAnnotationsText : fieldAnnotationsText + " "; if (fieldAccessorCandidate != null && fieldAccessorCandidate.isDefault()) { String accessorAnnotationsText = Arrays.stream(fieldAccessorCandidate.getAccessor().getAnnotations()) .filter(accessorAnn -> !CommonClassNames.JAVA_LANG_OVERRIDE.equals(accessorAnn.getQualifiedName())) .filter(anno -> !AnnotationTargetUtil.isTypeAnnotation(anno)) .filter(accessorAnn -> !ContainerUtil.exists(fieldAnnotations, fieldAnn -> AnnotationUtil.equal(fieldAnn, accessorAnn))) .map(PsiAnnotation::getText).collect(Collectors.joining(" ")); annotationsText = accessorAnnotationsText.isEmpty() ? annotationsText : annotationsText + accessorAnnotationsText + " "; } return annotationsText + componentType.getCanonicalText(true) + " " + field.getName(); }