KType

expect interface KType(source)

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

Since Kotlin

1.0
actual interface KType(source)

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

Since Kotlin

1.1
actual interface KType : KAnnotatedElement(source)

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

Since Kotlin

1.0
actual interface KType(source)

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

Since Kotlin

1.3
actual interface KType(source)

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

Since Kotlin

1.8
actual interface KType(source)

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

Since Kotlin

1.8

Properties

Link copied to clipboard
abstract val annotations: List<Annotation>

Annotations which are present on this element.

Since Kotlin 1.0
Link copied to clipboard
expect abstract val arguments: List<KTypeProjection>

Type arguments passed for the parameters of the classifier in this type. For example, in the type Array<out Number> the only type argument is out Number.

Since Kotlin 1.1
actual abstract val arguments: List<KTypeProjection>

Type arguments passed for the parameters of the classifier in this type. For example, in the type Array<out Number> the only type argument is out Number.

Since Kotlin 1.1
actual abstract val arguments: List<KTypeProjection>

Type arguments passed for the parameters of the classifier in this type. For example, in the type Array<out Number> the only type argument is out Number.

Since Kotlin 1.1
actual abstract val arguments: List<KTypeProjection>

Type arguments passed for the parameters of the classifier in this type. For example, in the type Array<out Number> the only type argument is out Number.

Since Kotlin 1.3
actual abstract val arguments: List<KTypeProjection>

Type arguments passed for the parameters of the classifier in this type. For example, in the type Array<out Number> the only type argument is out Number.

Since Kotlin 1.8
actual abstract val arguments: List<KTypeProjection>

Type arguments passed for the parameters of the classifier in this type. For example, in the type Array<out Number> the only type argument is out Number.

Since Kotlin 1.8
Link copied to clipboard
expect abstract val classifier: KClassifier?

The declaration of the classifier used in this type. For example, in the type List<String> the classifier would be the KClass instance for List.

Since Kotlin 1.1
actual abstract val classifier: KClassifier?

The declaration of the classifier used in this type. For example, in the type List<String> the classifier would be the KClass instance for List.

Since Kotlin 1.1
actual abstract val classifier: KClassifier?

The declaration of the classifier used in this type. For example, in the type List<String> the classifier would be the KClass instance for List.

Since Kotlin 1.1
actual abstract val classifier: KClassifier?

The declaration of the classifier used in this type. For example, in the type List<String> the classifier would be the KClass instance for List.

Since Kotlin 1.3
actual abstract val classifier: KClassifier?

The declaration of the classifier used in this type. For example, in the type List<String> the classifier would be the KClass instance for List.

Since Kotlin 1.8
actual abstract val classifier: KClassifier?

The declaration of the classifier used in this type. For example, in the type List<String> the classifier would be the KClass instance for List.

Since Kotlin 1.8
Link copied to clipboard
expect abstract val isMarkedNullable: Boolean

true if this type was marked nullable in the source code.

Since Kotlin 1.0
actual abstract val isMarkedNullable: Boolean

true if this type was marked nullable in the source code.

Since Kotlin 1.1
actual abstract val isMarkedNullable: Boolean

true if this type was marked nullable in the source code.

Since Kotlin 1.0
actual abstract val isMarkedNullable: Boolean

true if this type was marked nullable in the source code.

Since Kotlin 1.3
actual abstract val isMarkedNullable: Boolean

true if this type was marked nullable in the source code.

Since Kotlin 1.8
actual abstract val isMarkedNullable: Boolean

true if this type was marked nullable in the source code.

Since Kotlin 1.8
Link copied to clipboard

Returns a Java Type instance corresponding to the given Kotlin type.

Since Kotlin 1.4