W3cubDocs

/Kotlin

AssociatedObjectKey

Platform and version requirements: JS (1.1), Native (1.3)
@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class AssociatedObjectKey

Makes the annotated annotation class an associated object key.

An associated object key annotation should have single KClass parameter. When applied to a class with reference to an object declaration as an argument, it binds the object to the class, making this binding discoverable at runtime using findAssociatedObject.

Constructors

Platform and version requirements: JS (1.1), Native (1.1)

<init>

Makes the annotated annotation class an associated object key.

<init>()

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-associated-object-key/index.html