private static void appendScriptToChain(StringBuilder builder, String script) { if ((script == null) || (script.length() == 0)) { return; } if (builder.charAt(builder.length() - 1) != ',') builder.append(','); appendQuotedValue(builder, script); }
public static void appendProperty( StringBuilder builder, String name, Object value, boolean quoteValue) { if ((null == name) || (name.length() == 0)) throw new IllegalArgumentException(); char lastChar = builder.charAt(builder.length() - 1); if ((lastChar != ',') && (lastChar != '{')) builder.append(','); appendQuotedValue(builder, name); builder.append(":"); if (value == null) { builder.append("''"); } else if (quoteValue) { appendQuotedValue(builder, value.toString()); } else { builder.append(value.toString()); } }