String (@NotNull PsiVariable psiVariable, @NotNull String fieldName, @NotNull String builderVariable) { final PsiManager psiManager = psiVariable.getManager(); final PsiType psiFieldType = psiVariable.getType(); final PsiType keyType = PsiTypeUtil.extractOneElementType(psiFieldType, psiManager, CommonClassNames.JAVA_UTIL_MAP, 0); final PsiType valueType = PsiTypeUtil.extractOneElementType(psiFieldType, psiManager, CommonClassNames.JAVA_UTIL_MAP, 1); return MessageFormat.format( "{3}<{1}, {2}> {0} = " + "{4}.{0} == null ? " + "{3}.<{1}, {2}>of() : " + "{4}.{0}.build();\n", fieldName, keyType.getCanonicalText(false), valueType.getCanonicalText(false), collectionQualifiedName, builderVariable); }