You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Utils.kt
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -387,23 +387,43 @@ internal fun KCallable<*>.isGetterLike(): Boolean =
387
387
else->false
388
388
}
389
389
390
+
/** Returns the getter name for this callable.
391
+
* The name of the callable is returned with proper getter-trimming if it's a [KFunction]. */
392
+
internalvalKFunction<*>.getterName:String
393
+
get() = name
394
+
.removePrefix("get")
395
+
.removePrefix("is")
396
+
.replaceFirstChar { it.lowercase() }
397
+
398
+
/** Returns the getter name for this callable.
399
+
* The name of the callable is returned with proper getter-trimming if it's a [KFunction]. */
400
+
internalvalKProperty<*>.getterName:String
401
+
get() = name
402
+
403
+
/**
404
+
* Returns the getter name for this callable.
405
+
* The name of the callable is returned with proper getter-trimming if it's a [KFunction].
406
+
*/
407
+
internalvalKCallable<*>.getterName:String
408
+
get() =when (this) {
409
+
isKFunction<*> -> getterName
410
+
isKProperty<*> -> getterName
411
+
else-> name
412
+
}
413
+
390
414
/** Returns the column name for this callable.
391
415
* If the callable contains the [ColumnName][org.jetbrains.kotlinx.dataframe.annotations.ColumnName] annotation, its [ColumnName.name][org.jetbrains.kotlinx.dataframe.annotations.ColumnName.name] is returned.
392
416
* Otherwise, the name of the callable is returned with proper getter-trimming if it's a [KFunction]. */
* If the callable contains the [ColumnName][org.jetbrains.kotlinx.dataframe.annotations.ColumnName] annotation, its [ColumnName.name][org.jetbrains.kotlinx.dataframe.annotations.ColumnName.name] is returned.
403
423
* Otherwise, the name of the callable is returned with proper getter-trimming if it's a [KFunction]. */
0 commit comments