ImmutableKmClass

Immutable representation of KmClass.

Represents a Kotlin class.

Functions

component1
Link copied to clipboard
operator fun component1(): Flags
component10
Link copied to clipboard
operator fun component10(): List<String>
component11
Link copied to clipboard
operator fun component11(): List<String>
component12
Link copied to clipboard
operator fun component12(): List<ClassName>
component13
Link copied to clipboard
operator fun component13(): List<ImmutableKmVersionRequirement>
component14
Link copied to clipboard
operator fun component14(): List<ImmutableKmProperty>
component15
Link copied to clipboard
operator fun component15(): String?
component16
Link copied to clipboard
operator fun component16(): String?
component2
Link copied to clipboard
operator fun component2(): ClassName
component3
Link copied to clipboard
operator fun component3(): List<ImmutableKmTypeParameter>
component4
Link copied to clipboard
operator fun component4(): List<ImmutableKmType>
component5
Link copied to clipboard
operator fun component5(): List<ImmutableKmFunction>
component6
Link copied to clipboard
operator fun component6(): List<ImmutableKmProperty>
component7
Link copied to clipboard
operator fun component7(): List<ImmutableKmTypeAlias>
component8
Link copied to clipboard
operator fun component8(): List<ImmutableKmConstructor>
component9
Link copied to clipboard
operator fun component9(): String?
copy
Link copied to clipboard
fun copy(flags: Flags, name: ClassName, typeParameters: List<ImmutableKmTypeParameter>, supertypes: List<ImmutableKmType>, functions: List<ImmutableKmFunction>, properties: List<ImmutableKmProperty>, typeAliases: List<ImmutableKmTypeAlias>, constructors: List<ImmutableKmConstructor>, companionObject: String?, nestedClasses: List<String>, enumEntries: List<String>, sealedSubclasses: List<ClassName>, versionRequirements: List<ImmutableKmVersionRequirement>, localDelegatedProperties: List<ImmutableKmProperty>, moduleName: String?, anonymousObjectOriginName: String?): ImmutableKmClass
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(): KmClass
toString
Link copied to clipboard
open override fun toString(): String

Properties

anonymousObjectOriginName
Link copied to clipboard

JVM internal name of the original class this anonymous object is copied from. This value is set for anonymous objects copied from bodies of inline functions to the use site by the Kotlin compiler.

val anonymousObjectOriginName: String?
companionObject
Link copied to clipboard

Name of the companion object of this class, if it has one.

val companionObject: String?
constructors
Link copied to clipboard

Constructors of the class.

val constructors: List<ImmutableKmConstructor>
enumEntries
Link copied to clipboard

Names of enum entries, if this class is an enum class.

val enumEntries: List<String>
flags
Link copied to clipboard

Class flags, consisting of Flag.HAS_ANNOTATIONS, visibility flag, modality flag and Flag.Class flags.

open override val flags: Flags
functions
Link copied to clipboard

Functions in the class.

open override val functions: List<ImmutableKmFunction>
localDelegatedProperties
Link copied to clipboard

Metadata of local delegated properties used somewhere inside this class (but not in a nested class). Note that for classes produced by the Kotlin compiler, such properties will have default accessors.

The order of local delegated properties in this list is important. The Kotlin compiler generates the corresponding property's index at the call site, so that reflection would be able to load the metadata of the property with that index at runtime. If an incorrect index is used, either the KProperty<*> object passed to delegate methods will point to the wrong property at runtime, or an exception will be thrown.

val localDelegatedProperties: List<ImmutableKmProperty>
moduleName
Link copied to clipboard

Name of the module where this class is declared.

val moduleName: String?
name
Link copied to clipboard

Name of the class.

val name: ClassName
nestedClasses
Link copied to clipboard

Names of nested classes of this class.

val nestedClasses: List<String>
properties
Link copied to clipboard

Properties in the class.

open override val properties: List<ImmutableKmProperty>
sealedSubclasses
Link copied to clipboard

Names of direct subclasses of this class, if this class is sealed.

val sealedSubclasses: List<ClassName>
supertypes
Link copied to clipboard

Supertypes of the class. The first element is the superclass (or Any).

val supertypes: List<ImmutableKmType>
typeAliases
Link copied to clipboard

Type aliases in the class.

open override val typeAliases: List<ImmutableKmTypeAlias>
typeParameters
Link copied to clipboard

Type parameters of the class.

val typeParameters: List<ImmutableKmTypeParameter>
versionRequirements
Link copied to clipboard

Version requirements on this class.

val versionRequirements: List<ImmutableKmVersionRequirement>

Extensions

isAnnotation
Link copied to clipboard
val ImmutableKmClass.isAnnotation: Boolean
isClass
Link copied to clipboard
val ImmutableKmClass.isClass: Boolean
isCompanionObject
Link copied to clipboard
val ImmutableKmClass.isCompanionObject: Boolean
isData
Link copied to clipboard
val ImmutableKmClass.isData: Boolean
isEnum
Link copied to clipboard
val ImmutableKmClass.isEnum: Boolean
isEnumEntry
Link copied to clipboard
val ImmutableKmClass.isEnumEntry: Boolean
isExpect
Link copied to clipboard
val ImmutableKmClass.isExpect: Boolean
isExternal
Link copied to clipboard
val ImmutableKmClass.isExternal: Boolean
isInline
Link copied to clipboard
val ImmutableKmClass.isInline: Boolean
isInner
Link copied to clipboard
val ImmutableKmClass.isInner: Boolean
isInterface
Link copied to clipboard
val ImmutableKmClass.isInterface: Boolean
isObject
Link copied to clipboard
val ImmutableKmClass.isObject: Boolean