KTypeProjection
data class KTypeProjection
(source)Platform and version requirements: Kotlin 1.1
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.
Constructors
Represents a type projection. Type projection is usually the argument to another type in a type usage.
For example, in the type 
Properties
val type: KType? The type specified in the projection, or 

val variance: KVariance? The usesite variance specified in the projection, or 
Companion Object Properties
val STAR: KTypeProjection Star projection, denoted by the 
Companion Object Functions
fun contravariant(type: KType): KTypeProjection Creates a contravariant projection of a given type, denoted by the 

fun covariant(type: KType): KTypeProjection Creates a covariant projection of a given type, denoted by the 

fun invariant(type: KType): KTypeProjection Creates an invariant projection of a given type. Invariant projection is just the type itself,
without any usesite variance modifiers applied to it.
For example, in the type 