W3cubDocs

/Kotlin

name

Platform and version requirements: JVM (1.0), JS (1.1), Native (1.3)
abstract val name: String

The name of this callable as it was declared in the source code. If the callable has no name, a special invented name is created. Nameless callables include:

  • constructors have the name "",
  • property accessors: the getter for a property named "foo" will have the name "<get-foo>", the setter, similarly, will have the name "<set-foo>".

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-callable/name.html