KmProperty

Represents a Kotlin property declaration.

Various property attributes can be read and manipulated via extension properties, such as KmProperty.visibility or KmProperty.isVar.

Getter and setter attributes are available separately via extensions on KmProperty.getter and KmProperty.setter correspondingly.

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard

Types of context receivers of the property.

Link copied to clipboard

JVM signature of the backing field of the property, or null if this property has no backing field.

Link copied to clipboard

Attributes of the getter of this property. Attributes can be retrieved with extension properties, such as KmPropertyAccessorAttributes.visibility or KmPropertyAccessorAttributes.isNotDefault.

Link copied to clipboard

JVM signature of the property getter, or null if this property has no getter or its signature is unknown.

Link copied to clipboard

Indicates that the corresponding property 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 property is const.

Link copied to clipboard

Indicates that the corresponding property is a delegated property.

Link copied to clipboard

Indicates that the corresponding property is expect.

Link copied to clipboard

Indicates that the corresponding property is external.

Link copied to clipboard

Indicates that the corresponding property is lateinit.

Link copied to clipboard

Applicable to a property declared in an interface's companion object. Indicates that its backing field is declared as a static field in the interface. In Kotlin code, this usually happens if the property is annotated with JvmField.

Link copied to clipboard

Indicates that the corresponding property is var.

Link copied to clipboard

Represents kind of the corresponding property.

Link copied to clipboard

Represents modality of the corresponding property.

Link copied to clipboard

the name of the property

Link copied to clipboard

Type of the receiver of the property, if this is an extension property.

Link copied to clipboard
lateinit var returnType: KmType

Type of the property.

Link copied to clipboard

Attributes of the setter of this property. Attributes can be retrieved with extension properties, such as KmPropertyAccessorAttributes.visibility or KmPropertyAccessorAttributes.isNotDefault.

Link copied to clipboard

Value parameter of the setter of this property, if this is a var property and parameter is present. Parameter is present if and only if the setter is not default:

Link copied to clipboard

JVM signature of the property setter, or null if this property has no setter or its signature is unknown.

Link copied to clipboard

JVM signature of a synthetic method which is generated to store annotations on a property in the bytecode.

Link copied to clipboard

JVM signature of a synthetic method for properties which delegate to another property, which constructs and returns a property reference object. See https://kotlinlang.org/docs/delegated-properties.html#delegating-to-another-property.

Link copied to clipboard

Type parameters of the property.

Link copied to clipboard

Version requirements on the property.

Link copied to clipboard

Represents visibility of the corresponding property.