W3cubDocs

/Kotlin

KClassifier

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
interface KClassifier

A classifier is either a class or a type parameter.

See Also

KClass

KTypeParameter

Extension Properties

Platform and version requirements: JVM (1.1)

starProjectedType

Creates an instance of KType with the given classifier, substituting all its type parameters with star projections. The resulting type is not marked as nullable and does not have any annotations.

val KClassifier.starProjectedType: KType

Extension Functions

Platform and version requirements: JVM (1.1)

createType

Creates a KType instance with the given classifier, type arguments, nullability and annotations. If the number of passed type arguments is not equal to the total number of type parameters of a classifier, an exception is thrown. If any of the arguments does not satisfy the bounds of the corresponding type parameter, an exception is thrown.

fun KClassifier.createType(
    arguments: List<KTypeProjection> = emptyList(), 
    nullable: Boolean = false, 
    annotations: List<Annotation> = emptyList()
): KType

Inheritors

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.

Platform and version requirements:
interface KClass<T : Any>
Platform and version requirements: JVM (1.0), JS (1.1), Native (1.3)
interface KClass<T : Any> : 
    KDeclarationContainer, 
    KAnnotatedElement, 
    KClassifier
Platform and version requirements: JVM (1.1), JS (1.1)

KTypeParameter

Represents a declaration of a type parameter of a class or a callable. See the Kotlin language documentation for more information.

interface KTypeParameter : KClassifier

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-classifier.html