DslMarker
Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class DslMarker
When applied to annotation class X specifies that X defines a DSL language
The general rule:
- an implicit receiver may belong to a DSL @X if marked with a corresponding DSL marker annotation
- two implicit receivers of the same DSL are not accessible in the same scope
- the closest one wins
- other available receivers are resolved as usual, but if the resulting resolved call binds to such a receiver, it's a compilation error
Marking rules: an implicit receiver is considered marked with @Ann if
- its type is marked, or
- its type's classifier is marked
- or any of its superclasses/superinterfaces
Constructors
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
<init>
When applied to annotation class X specifies that X defines a DSL language
<init>()
Extension Properties
Platform and version requirements: JVM (1.0)
annotationClass
Returns a KClass instance corresponding to the annotation type of this annotation.
val <T : Annotation> T.annotationClass: KClass<out T>
© 2010–2021 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/-dsl-marker/index.html