KTypeProjection

data class KTypeProjection(val variance: KVariance?, val type: KType?)(source)

Represents a type projection. Type projection is usually the argument to another type in a type usage. For example, in the type Array<out Number>, out Number is the covariant projection of the type represented by the class Number.

Type projection is either the star projection, or an entity consisting of a specific type plus optional variance.

See the Kotlin language documentation for more information.

Since Kotlin

1.1

Constructors

Link copied to clipboard
constructor(variance: KVariance?, type: KType?)

Types

Link copied to clipboard
object Companion
Since Kotlin 1.1

Properties

Link copied to clipboard
val type: KType?

The type specified in the projection, or null if this is a star projection.

Since Kotlin 1.1
Link copied to clipboard

The use-site variance specified in the projection, or null if this is a star projection.

Since Kotlin 1.1

Functions

Link copied to clipboard
open override fun toString(): String
Since Kotlin 1.1