Have the NodePrinter show collections as sequences

This commit is contained in:
Juan Martín Sotuyo Dodero 2024-04-19 01:51:21 -03:00
parent 02e7a713fa
commit d7693369ab

View File

@ -93,6 +93,9 @@ open class BaseNodeAttributePrinter : TextTreeRenderer(true, -1) {
is Enum<*> -> value.enumDeclaringClass.simpleName + "." + value.name
is Class<*> -> value.canonicalName?.let { "$it.class" }
is Number, is Boolean -> value.toString()
is Collection<*> -> value.joinToString(prefix = "(", postfix = ")", separator = ", ") {
"${valueToString(it)}"
}
null -> "null"
else -> null
}