String (GrListOrMap listOrMap, PsiType type) { StringBuilder declaration = new StringBuilder(); TypeWriter.writeType(declaration, type, listOrMap); final String varName = GenerationUtil.suggestVarName(type, listOrMap, this.context); declaration.append(' ').append(varName).append(" = new "); TypeWriter.writeTypeForNew(declaration, type, listOrMap); declaration.append('('); //insert count of elements in list or map declaration.append(listOrMap.getNamedArguments().length); declaration.append(");"); context.myStatements.add(declaration.toString()); return varName; }