String (@NotNull String singularName, @NotNull BuilderInfo info) { final String codeBlockTemplate = """ if (this.{0} == null) this.{0} = new java.util.ArrayList<{3}>();\s this.{0}.add({1}); return {2};"""; final PsiType oneElementType = PsiTypeUtil.extractOneElementType(info.getFieldType(), info.getManager()); return MessageFormat.format(codeBlockTemplate, info.getFieldName(), singularName, info.getBuilderChainResult(), oneElementType.getCanonicalText(false)); }