@Override
                public String toString(Object o, String formatName)
                {
                    String str = (String) o;
                    if (formatName == null)
                        return str;

                    String[] formats = FORMAT_DELIM.split(formatName);

                    return formats.length == 0 ? format(str, formatName) :
                            chainedFormat(str, formats);
                }
Base class for code generators using StringTemplate.

@author David Yu
@created Jan 5, 2010
protostuff-compiler/src/main/java/io/protostuff/compiler/STCodeGenerator.java