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
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.
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.
A list/array argument. Annotation vararg and Array<X> arguments are captured here.