Target

annotation class Target(val allowedTargets: AnnotationTarget)(source)

This meta-annotation indicates the kinds of code elements which are possible targets of an annotation.

If the target meta-annotation is not present on an annotation declaration, the annotation is applicable to the following elements: CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER.

Since Kotlin

1.0
annotation class Target(val allowedTargets: AnnotationTarget)(source)

This meta-annotation indicates the kinds of code elements which are possible targets of an annotation.

If the target meta-annotation is not present on an annotation declaration, the annotation is applicable to the following elements: CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER.

Since Kotlin

1.1
annotation class Target(val allowedTargets: AnnotationTarget)(source)

This meta-annotation indicates the kinds of code elements which are possible targets of an annotation.

If the target meta-annotation is not present on an annotation declaration, the annotation is applicable to the following elements: CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER, CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER.

Since Kotlin

1.3

Properties

Link copied to clipboard

list of allowed annotation targets

Since Kotlin 1.0

list of allowed annotation targets

Since Kotlin 1.1

list of allowed annotation targets

Since Kotlin 1.3