KClassifier

interface KClassifier

A classifier is either a class or a type parameter.

Since Kotlin

1.1

See also

Inheritors

KTypeParameter
Link copied to clipboard
KClass
Link copied to clipboard

Extensions

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

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.

starProjectedType
Link copied to clipboard
val KClassifier.starProjectedType: KType

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.