ImmutableKmType

Immutable representation of KmType.

Represents a type.

data class ImmutableKmType : ImmutableKmWithFlags

Functions

component1
Link copied to clipboard
operator fun component1(): Flags
component2
Link copied to clipboard
operator fun component2(): KmClassifier
component3
Link copied to clipboard
operator fun component3(): List<ImmutableKmTypeProjection>
component4
Link copied to clipboard
operator fun component4(): ImmutableKmType?
component5
Link copied to clipboard
operator fun component5(): ImmutableKmType?
component6
Link copied to clipboard
operator fun component6(): ImmutableKmFlexibleTypeUpperBound?
component7
Link copied to clipboard
operator fun component7(): Boolean
component8
Link copied to clipboard
operator fun component8(): List<KmAnnotation>
copy
Link copied to clipboard
fun copy(flags: Flags, classifier: KmClassifier, arguments: List<ImmutableKmTypeProjection>, abbreviatedType: ImmutableKmType?, outerType: ImmutableKmType?, flexibleTypeUpperBound: ImmutableKmFlexibleTypeUpperBound?, isRaw: Boolean, annotations: List<KmAnnotation>): ImmutableKmType
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
toMutable
Link copied to clipboard
fun toMutable(): KmType
toString
Link copied to clipboard
open override fun toString(): String

Properties

abbreviatedType
Link copied to clipboard

Abbreviation of this type. Note that all types are expanded for metadata produced by the Kotlin compiler. For example:

    typealias A<T> = MutableList<T>

    fun foo(a: A<Any>) {}

The type of the foo's parameter in the metadata is actually MutableList<Any>, and its abbreviation is A<Any>.

val abbreviatedType: ImmutableKmType?
annotations
Link copied to clipboard

Annotations on the type.

val annotations: List<KmAnnotation>
arguments
Link copied to clipboard

Arguments of the type, if the type's classifier is a class or a type alias.

val arguments: List<ImmutableKmTypeProjection>
classifier
Link copied to clipboard

Classifier of the type.

val classifier: KmClassifier
flags
Link copied to clipboard

Type flags, consisting of Flag.Type flags.

open override val flags: Flags
flexibleTypeUpperBound
Link copied to clipboard

Upper bound of this type, if this type is flexible. In that case, all other data refers to the lower bound of the type.

Flexible types in Kotlin include platform types in Kotlin/JVM and dynamic type in Kotlin/JS.

isExtensionType
Link copied to clipboard

true if this is an extension type (i.e. String.() -> Unit vs (String) -> Unit).

See details: https://discuss.kotlinlang.org/t/announcing-kotlinx-metadata-jvm-library-for-reading-modifying-metadata-of-kotlin-jvm-class-files/7980/27

val isExtensionType: Boolean
isRaw
Link copied to clipboard

true if the type is seen as a raw type in Java.

val isRaw: Boolean
outerType
Link copied to clipboard

Outer type of this type, if this type's classifier is an inner class. For example:

    class A<T> { inner class B<U> }

    fun foo(a: A<*>.B<Byte?>) {}

The type of the foo's parameter in the metadata is B<Byte> (a type whose classifier is class B, and it has one type argument, type Byte?), and its outer type is A<*> (a type whose classifier is class A, and it has one type argument, star projection).

val outerType: ImmutableKmType?

Extensions

isNullable
Link copied to clipboard
val ImmutableKmType.isNullable: Boolean
isSuspend
Link copied to clipboard
val ImmutableKmType.isSuspend: Boolean