Skip to content

Commit 6cda884

Browse files
committed
Improve toString for the debugger
1 parent 2a519b2 commit 6cda884

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/codeGen/GeneratedField.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import org.jetbrains.kotlinx.dataframe.impl.codeGen.needsQuoting
55
import org.jetbrains.kotlinx.dataframe.schema.ColumnSchema
66

77
public sealed interface FieldType {
8-
public class ValueFieldType(public val typeFqName: String) : FieldType
9-
public class FrameFieldType(public val markerName: String, public val nullable: Boolean) : FieldType
10-
public class GroupFieldType(public val markerName: String) : FieldType
8+
public data class ValueFieldType(public val typeFqName: String) : FieldType
9+
public data class FrameFieldType(public val markerName: String, public val nullable: Boolean) : FieldType
10+
public data class GroupFieldType(public val markerName: String) : FieldType
1111
}
1212

1313
/**
@@ -88,6 +88,11 @@ public class ValidFieldName private constructor(private val identifier: String,
8888
return ValidFieldName(identifier = identifier + other.identifier, needsQuote = needsQuote || other.needsQuote)
8989
}
9090

91+
override fun toString(): String {
92+
return identifier
93+
}
94+
95+
9196
public companion object {
9297
public fun of(name: String): ValidFieldName {
9398
val needsQuote = name.needsQuoting()

dataframe-openapi/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/OpenApiMarker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ internal sealed class OpenApiMarker private constructor(
4040
abstract fun toFieldType(): FieldType
4141

4242
override fun toString(): String =
43-
"MyMarker(markerType = ${this::class}, name = $name, isOpen = $isOpen, fields = $fields, superMarkers = $superMarkers, visibility = $visibility, typeParameters = $typeParameters, typeArguments = $typeArguments)"
43+
"MyMarker(name = $name, isOpen = $isOpen, markerType = ${this::class}, fields = $fields, superMarkers = $superMarkers, visibility = $visibility, typeParameters = $typeParameters, typeArguments = $typeArguments)"
4444

4545
/**
4646
* A [Marker] that will be used to generate an enum.

0 commit comments

Comments
 (0)