MetadataValue

sealed class MetadataValue

A typed wrapper for an argument captured into a MethodMetadata.

The set of permitted shapes is fixed at this sealed hierarchy so the compiler plugin and consumers agree on what values can travel in a method descriptor. Arbitrary Any? is intentionally not permitted: every captured value has a concrete static type.

Inheritors

Types

Link copied to clipboard
data class BooleanValue(val value: Boolean) : MetadataValue
Link copied to clipboard
data class DoubleValue(val value: Double) : MetadataValue
Link copied to clipboard
data class EnumValue(val value: Enum<*>) : MetadataValue

An enum constant captured as a real reference to the enum entry. The compiler plugin emits the same IrGetEnumValue already present on the source-level annotation argument, so consumers receive the actual enum constant.

Link copied to clipboard
data class FloatValue(val value: Float) : MetadataValue
Link copied to clipboard
data class IntValue(val value: Int) : MetadataValue
Link copied to clipboard
data class KClassValue(val kClass: KClass<*>) : MetadataValue

A KClass<*> literal captured directly as a real reference. The compiler plugin emits the same IrClassReference already present on the source-level annotation argument, so consumers receive the actual KClass and can call reflection facilities directly when supported.

Link copied to clipboard
data class ListValue(val items: List<MetadataValue>) : MetadataValue

A list/array argument. Annotation vararg and Array<X> arguments are captured here.

Link copied to clipboard
data class LongValue(val value: Long) : MetadataValue
Link copied to clipboard
data class StringValue(val value: String) : MetadataValue