Here you can find the source of formatVarname(StringBuilder buffer, Object varname)
public static void formatVarname(StringBuilder buffer, Object varname)
//package com.java2s; /*/*from w w w .j av a 2 s. c om*/ ** Copyright 2009-2014 by LivingLogic AG, Bayreuth/Germany ** All Rights Reserved ** See LICENSE for the license */ import java.util.List; public class Main { public static void formatVarname(StringBuilder buffer, Object varname) { if (varname instanceof String) buffer.append((String) varname); else { List varnames = (List) varname; buffer.append("("); int count = 0; for (Object subvarname : varnames) { ++count; formatVarname(buffer, subvarname); if (count == 1 || count != varnames.size()) buffer.append(", "); } buffer.append(")"); } } }