String (@NotNull PsiParameter parameter, @NotNull Map<PsiField, @Nullable FieldAccessorCandidate> fieldAccessors) { PsiField field = null; FieldAccessorCandidate fieldAccessorCandidate = null; for (var entry : fieldAccessors.entrySet()) { if (entry.getKey().getName().equals(parameter.getName())) { field = entry.getKey(); fieldAccessorCandidate = entry.getValue(); break; } } assert field != null; // Do not use parameter.getType() directly, as type annotations may differ; prefer type annotations on the field PsiType componentType = field.getType(); if (parameter.getType() instanceof PsiEllipsisType && componentType instanceof PsiArrayType arrayType) { componentType = new PsiEllipsisType(arrayType.getComponentType(), arrayType.getAnnotationProvider()); } return generateComponentText(field, componentType, fieldAccessorCandidate); }