SubclassOptInRequired(markerClass: KClass<out Annotation>)
Annotation that marks open for subclassing classes and interfaces, and makes implementation and extension of such declarations as requiring an explicit opt-in.
When applied, any attempt to subclass the target declaration will trigger an opt-in with the corresponding level and message.
The intended uses of subclass opt-in markers include, but are not limited to the following API:
Contrary to regular RequiresOptIn, there are three ways to opt-in into the subclassing requirement:
Uses of this annotation are limited to open and abstract classes, and non-fun interfaces. Any other uses allowed by CLASS annotation target yield a compilation error.
© 2010–2023 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/-subclass-opt-in-required/-init-.html