void (final StringBuilder builder, final String indent, final Object obj) { if (obj instanceof ElementPattern) { ((ElementPattern)obj).getCondition().append(builder, indent + " "); } else if (obj instanceof Object[]) { appendArray(builder, indent, (Object[])obj); } else if (obj instanceof Collection) { appendArray(builder, indent, ((Collection<?>) obj).toArray()); } else if (obj instanceof String) { builder.append('\"').append(obj).append('\"'); } else { builder.append(obj); } }