Package-level declarations

Contains core data structures representing metadata of various Kotlin declarations.

Types

Link copied to clipboard

Represents the kind of the corresponding class, i.e., the way it is declared in the source code.

Link copied to clipboard
typealias ClassName = String

A fully qualified name of a classifier from the Kotlin's point of view. May differ from the JVM name of the class which is the runtime representation of this Kotlin classifier (for example, Kotlin class "kotlin/Int" -> JVM class "java/lang/Integer")

Link copied to clipboard

Marks an API related to the Kotlin's context receivers experimental feature.

Link copied to clipboard
class KmAnnotation(val className: ClassName, val arguments: Map<String, KmAnnotationArgument>)

Represents an annotation, written to the Kotlin metadata. Note that not all annotations are written to metadata on all platforms. For example, on JVM most of the annotations are written directly on the corresponding declarations in the class file, and entries in the metadata only have an attribute (such as KmClass.hasAnnotations) to signal if they do have annotations in the bytecode. On JVM, only annotations on type parameters and types are serialized to the Kotlin metadata (see KmType.annotations and KmTypeParameter.annotations JVM extensions)

Link copied to clipboard

Represents an argument of the annotation.

Link copied to clipboard

Represents a Kotlin class.

Link copied to clipboard
sealed class KmClassifier

Represents a classifier of a Kotlin type. A classifier is a class, type parameter, or type alias. For example, in MutableMap<in String?, *>, MutableMap is the classifier.

Link copied to clipboard
data class KmConstantValue(val value: Any?)

Represents a constant value used in an effect expression.

Link copied to clipboard

Represents a constructor of a Kotlin class.

Link copied to clipboard

Represents a contract of a Kotlin function.

Link copied to clipboard

Represents a Kotlin declaration container, such as a class or a package fragment.

Link copied to clipboard
class KmEffect(var type: KmEffectType, var invocationKind: KmEffectInvocationKind?)

Represents an effect (a part of the contract of a Kotlin function).

Link copied to clipboard

Represents an effect expression, the contents of an effect (a part of the contract of a Kotlin function).

Link copied to clipboard

Number of invocations of a lambda parameter specified by an effect (a part of the contract of a Kotlin function).

Link copied to clipboard

Type of an effect (a part of the contract of a Kotlin function).

Link copied to clipboard
data class KmFlexibleTypeUpperBound(var type: KmType, var typeFlexibilityId: String?)

Represents an upper bound of a flexible Kotlin type.

Link copied to clipboard

Represents a Kotlin function declaration.

Link copied to clipboard
class KmLambda

Represents a synthetic class generated for a Kotlin lambda.

Link copied to clipboard

Represents a Kotlin package fragment that contains top-level functions, properties, and type aliases. Package fragments are produced from single file facades and multi-file class parts. Note that a package fragment does not contain any classes, as classes are not a part of file facades and have their own metadata.

Link copied to clipboard

Represents a Kotlin property declaration.

Link copied to clipboard

Represents a Kotlin property accessor.

Link copied to clipboard
class KmType

Represents a type.

Link copied to clipboard

Represents a Kotlin type alias declaration.

Link copied to clipboard

Represents a type parameter of a Kotlin class, function, property, or type alias.

Link copied to clipboard
data class KmTypeProjection(var variance: KmVariance?, var type: KmType?)

Represents type projection used in a type argument of the type based on a class or on a type alias. For example, in MutableMap<in String?, *>, in String? is the type projection which is the first type argument of the type.

Link copied to clipboard

Represents a value parameter of a Kotlin constructor, function, or property setter.

Link copied to clipboard

Variance applied to a type parameter on the declaration site (declaration-site variance), or to a type in a projection (use-site variance).

Link copied to clipboard
data class KmVersion(val major: Int, val minor: Int, val patch: Int)

Represents a version used in a version requirement.

Link copied to clipboard

Represents a version requirement on a Kotlin declaration.

Link copied to clipboard

Severity of the diagnostic reported by the compiler when a version requirement is not satisfied.

Link copied to clipboard

The kind of the version that is required by a version requirement.

Link copied to clipboard

Represents kind of a function or property.

Link copied to clipboard

Represents modality of the corresponding declaration.

Link copied to clipboard

Represents visibility level (also known as access level) of the corresponding declaration. Some of these visibilities may be non-denotable in Kotlin.

Properties

Link copied to clipboard

Indicates that the corresponding value parameter declares a default value. Note that the default value itself can be a complex expression and is not available via metadata. Also note that in case of an override of a parameter with default value, the parameter in the derived method does not declare the default value, but the parameter is still optional at the call site because the default value from the base method is used.

Link copied to clipboard

Indicates that the corresponding class has at least one annotation.

Indicates that the corresponding constructor has at least one annotation.

Indicates that the corresponding function has at least one annotation.

Indicates that the corresponding property has at least one annotation.

Indicates that the corresponding property accessor has at least one annotation.

Indicates that the corresponding type alias has at least one annotation.

Indicates that the corresponding value parameter has at least one annotation.

Link copied to clipboard

Indicates that the corresponding property has a constant value. On JVM, this flag allows an optimization similarly to KmProperty.hasAnnotations: constant values of properties are written to the bytecode directly, and this flag can be used to avoid reading the value from the bytecode in case it is not there.

Link copied to clipboard

Indicates that the corresponding enum class has synthetic ".entries" property in bytecode.

Link copied to clipboard

Indicates that the corresponding constructor has non-stable parameter names, i.e., cannot be called with named arguments.

Indicates that the corresponding function has non-stable parameter names, i.e., cannot be called with named arguments.

Link copied to clipboard

Indicates that the corresponding property is const.

Link copied to clipboard

Indicates that the corresponding value parameter is crossinline.

Link copied to clipboard

Indicates that the corresponding class or object is data. Always false for other kinds.

Link copied to clipboard

Indicates that the corresponding type is definitely non-null.

Link copied to clipboard

Indicates that the corresponding property is a delegated property.

Link copied to clipboard

Indicates that the corresponding class is expect.

Indicates that the corresponding function is expect.

Indicates that the corresponding property is expect.

Link copied to clipboard

Indicates that the corresponding class is external.

Indicates that the corresponding function is external.

Indicates that the corresponding property is external.

Indicates that the corresponding property accessor is external.

Link copied to clipboard

Indicates that the corresponding class is a functional interface, i.e., marked with the keyword fun.

Link copied to clipboard

Indicates that the corresponding function is infix.

Link copied to clipboard

Indicates that the corresponding function is inline.

Indicates that the corresponding property accessor is inline.

Link copied to clipboard

Indicates that the corresponding class is inner.

Link copied to clipboard

Indicates that the corresponding property is lateinit.

Link copied to clipboard

Indicates that the corresponding effect expression should be negated to compute the proposition or the conclusion of an effect.

Link copied to clipboard

Indicates that the corresponding value parameter is noinline.

Link copied to clipboard

Indicates that the corresponding property accessor is not default, i.e., it has a body and/or annotations in the source code, or the property is delegated.

Link copied to clipboard

Indicates that the corresponding type is marked as nullable, i.e., has a question mark at the end of its notation.

Link copied to clipboard

Indicates that the corresponding effect expression checks whether a value of some variable is null.

Link copied to clipboard

Indicates that the corresponding function is operator.

Link copied to clipboard

Indicates that the corresponding type parameter is reified.

Link copied to clipboard

Indicates that the corresponding constructor is secondary, i.e., declared not in the class header, but in the class body.

Link copied to clipboard

Indicates that the corresponding function is suspend.

Indicates that the corresponding type is suspend.

Link copied to clipboard

Indicates that the corresponding function is tailrec.

Link copied to clipboard

Indicates that the corresponding class is either a pre-Kotlin-1.5 inline class, or a 1.5+ value class.

Link copied to clipboard

Indicates that the corresponding property is var.

Link copied to clipboard

Represents kind of the corresponding class — whether it is a regular class or an interface, companion object, et cetera.

Represents kind of the corresponding function.

Represents kind of the corresponding property.

Link copied to clipboard

Represents modality of the corresponding class.

Represents modality of the corresponding function.

Represents modality of the corresponding property.

Represents modality of the corresponding property accessor.

Link copied to clipboard

Represents visibility of the corresponding class.

Represents visibility of the corresponding constructor.

Represents visibility of the corresponding function.

Represents visibility of the corresponding property.

Represents visibility of the corresponding property accessor.

Represents visibility of the corresponding type alias.

Functions

Link copied to clipboard

Checks whether a class name this represents a local class or an anonymous object.