KClass
Represents a class and provides introspection capabilities. Instances of this class are obtainable by the ::class
syntax. See the Kotlin language documentation for more information.
Since Kotlin
1.0Parameters
the type of the class.
Represents a class and provides introspection capabilities. Instances of this class are obtainable by the ::class
syntax. See the Kotlin language documentation for more information.
Since Kotlin
1.1Parameters
the type of the class.
Represents a class and provides introspection capabilities. Instances of this class are obtainable by the ::class
syntax. See the Kotlin language documentation for more information.
Since Kotlin
1.0Parameters
the type of the class.
Properties
Annotations which are present on this element.
All constructors declared in this class.
true
if this class is a companion object. See the Kotlin language documentation for more information.
true
if this class is a data class. See the Kotlin language documentation for more information.
true
if this class is an inner class. See the Kotlin language documentation for more information.
true
if this class is sealed
. See the Kotlin language documentation for more information.
All functions and properties accessible in this class, including those declared in this class and all of its superclasses. Does not include constructors.
All classes declared inside this class. This includes both inner and static nested classes.
The instance of the object declaration, or null
if this class is not an object declaration.
The fully qualified dot-separated name of the class, or null
if the class is local or a class of an anonymous object.
The fully qualified dot-separated name of the class, or null
if the class is local or a class of an anonymous object.
The fully qualified dot-separated name of the class, or null
if the class is local or a class of an anonymous object.
The simple name of the class as it was declared in the source code, or null
if the class has no name (if, for example, it is a class of an anonymous object).
The simple name of the class as it was declared in the source code, or null
if the class has no name (if, for example, it is a class of an anonymous object).
The simple name of the class as it was declared in the source code, or null
if the class has no name (if, for example, it is a class of an anonymous object).
The list of immediate supertypes of this class, in the order they are listed in the source code.
The list of type parameters of this class. This list does not include type parameters of outer classes.
Visibility of this class, or null
if its visibility cannot be represented in Kotlin.
Functions
If T is an @AssociatedObjectKey-annotated annotation class and this class is annotated with @T (S::class
), returns object S
.