if (comp == char.class) {
return "\"" + (Array.getLength(v) < 50 ? new String((char[]) v) : new String((char[]) v, 0, 50) + "...") + "\"";
}
else {
StringAppender appender = new StringAppender();
int len = Array.getLength(v);
appender.append("[");
for (int i = 0; i < len && i < 25; ) {
appender.append(String.valueOf(Array.get(v, i)));
if (++i < len && i < 25) appender.append(", ");
}
return appender.append("]").toString();
}
}
else if (cls == Character.class) {
return "'" + String.valueOf(v) + "'";
}