KmAnnotation

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)

Constructors

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

Properties

Link copied to clipboard

Explicitly specified arguments to the annotation; does not include default values for annotation parameters (specified in the annotation class declaration)

Link copied to clipboard

The fully qualified name of the annotation class

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks if this KmAnnotation is equal to the other. Instances of KmAnnotation are equal if they have same className and arguments.

Link copied to clipboard
open override fun hashCode(): Int

Returns hash code of this instance. Hash code is computed based on className and arguments.

Link copied to clipboard
open override fun toString(): String

Returns string representation of this instance with @ sign, className, and arguments in parenthesis.