interface KType
Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.
abstract val arguments: List<KTypeProjection> Type arguments passed for the parameters of the classifier in this type. For example, in the type | |
abstract val classifier: KClassifier? The declaration of the classifier used in this type. For example, in the type | |
abstract val isMarkedNullable: Boolean
|
open operator fun equals(other: Any?): Boolean Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements: | |
open fun hashCode(): Int Returns a hash code value for the object. The general contract of hashCode is: | |
open fun toString(): String Returns a string representation of the object. |
val KType.javaType: Type Returns a Java Type instance corresponding to the given Kotlin type. Note that one Kotlin type may correspond to different JVM types depending on where it appears. For example, Unit corresponds to the JVM class Unit when it's the type of a parameter, or to | |
val KType.jvmErasure: KClass<*> Returns the KClass instance representing the runtime class to which this type is erased to on JVM. |
fun KType.isSubtypeOf(other: KType): Boolean Returns | |
fun KType.isSupertypeOf(other: KType): Boolean Returns | |
fun KType.withNullability(nullable: Boolean): KType Returns a new type with the same classifier, arguments and annotations as the given type, and with the given nullability. |
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-type/