Annotation rename: target --> @Target
This commit is contained in:
@@ -26,7 +26,7 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
* See [the Kotlin language documentation](http://kotlinlang.org/docs/reference/data-classes.html)
|
||||
* for more information.
|
||||
*/
|
||||
target(CLASSIFIER)
|
||||
@Target(CLASSIFIER)
|
||||
@MustBeDocumented
|
||||
public annotation class data
|
||||
|
||||
@@ -36,8 +36,8 @@ public annotation class data
|
||||
* @property replaceWith if present, specifies a code fragment which should be used as a replacement for
|
||||
* the deprecated API usage.
|
||||
*/
|
||||
target(CLASSIFIER, FUNCTION, PROPERTY, ANNOTATION_CLASS, CONSTRUCTOR, PROPERTY_SETTER, PROPERTY_GETTER,
|
||||
LOCAL_VARIABLE, VALUE_PARAMETER)
|
||||
@Target(CLASSIFIER, FUNCTION, PROPERTY, ANNOTATION_CLASS, CONSTRUCTOR, PROPERTY_SETTER, PROPERTY_GETTER,
|
||||
LOCAL_VARIABLE, VALUE_PARAMETER)
|
||||
@MustBeDocumented
|
||||
public annotation class Deprecated(val value: String, val replaceWith: ReplaceWith = ReplaceWith(""))
|
||||
|
||||
@@ -54,7 +54,7 @@ public annotation class Deprecated(val value: String, val replaceWith: ReplaceWi
|
||||
* @property imports the qualified names that need to be imported in order for the references in the
|
||||
* replacement expression to be resolved correctly.
|
||||
*/
|
||||
target()
|
||||
@Target()
|
||||
@Retention(BINARY)
|
||||
@MustBeDocumented
|
||||
public annotation class ReplaceWith(val expression: String, vararg val imports: String)
|
||||
@@ -62,7 +62,7 @@ public annotation class ReplaceWith(val expression: String, vararg val imports:
|
||||
/**
|
||||
* Signifies that the annotated functional type represents an extension function.
|
||||
*/
|
||||
target(TYPE)
|
||||
@Target(TYPE)
|
||||
@MustBeDocumented
|
||||
public annotation class Extension
|
||||
|
||||
@@ -70,8 +70,8 @@ public annotation class Extension
|
||||
* Suppresses the given compilation warnings in the annotated element.
|
||||
* @property names names of the compiler diagnostics to suppress.
|
||||
*/
|
||||
target(CLASSIFIER, ANNOTATION_CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER,
|
||||
CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPE, EXPRESSION, FILE)
|
||||
@Target(CLASSIFIER, ANNOTATION_CLASS, PROPERTY, FIELD, LOCAL_VARIABLE, VALUE_PARAMETER,
|
||||
CONSTRUCTOR, FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER, TYPE, EXPRESSION, FILE)
|
||||
@Retention(SOURCE)
|
||||
public annotation class Suppress(vararg val names: String)
|
||||
|
||||
@@ -81,12 +81,12 @@ public annotation class Suppress(vararg val names: String)
|
||||
* growing the stack depth. Tail call optimization is currently only supported by the JVM
|
||||
* backend.
|
||||
*/
|
||||
target(FUNCTION)
|
||||
@Target(FUNCTION)
|
||||
// @deprecated("Use kotlin.tailrec instead", ReplaceWith("kotlin.tailrec"))
|
||||
@Retention(SOURCE)
|
||||
public annotation class tailRecursive
|
||||
|
||||
target(FUNCTION)
|
||||
@Target(FUNCTION)
|
||||
@Retention(SOURCE)
|
||||
public annotation class tailrec
|
||||
|
||||
@@ -95,7 +95,7 @@ public annotation class tailrec
|
||||
* thus preventing its usages from newly compiled code, but keeps compiling it
|
||||
* to retain binary compatibility with the code compiled against it before.
|
||||
*/
|
||||
target(FUNCTION, PROPERTY, CONSTRUCTOR)
|
||||
@Target(FUNCTION, PROPERTY, CONSTRUCTOR)
|
||||
@Retention(BINARY)
|
||||
@MustBeDocumented
|
||||
public annotation class HiddenDeclaration
|
||||
@@ -104,7 +104,7 @@ public annotation class HiddenDeclaration
|
||||
* Marks annotated function as `external`, meaning that it's not implemented
|
||||
* in Kotlin but rather in a different language (for example, in C/C++ using JNI or JavaScript).
|
||||
*/
|
||||
target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
@Target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
@Retention(SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class external
|
||||
|
||||
@@ -20,7 +20,7 @@ package kotlin
|
||||
* Annotates the parameter of a function annotated as [inline] and forbids inlining of
|
||||
* function literals passed as arguments for this parameter.
|
||||
*/
|
||||
target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
public annotation class noinline
|
||||
@@ -36,7 +36,7 @@ public annotation class noinline
|
||||
* @see noinline
|
||||
* @see inlineOptions
|
||||
*/
|
||||
target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
public annotation class inline(public val strategy: InlineStrategy = InlineStrategy.AS_FUNCTION)
|
||||
@@ -67,7 +67,7 @@ public enum class InlineStrategy {
|
||||
*
|
||||
* @property value the inlining options selected for the annotated function parameter.
|
||||
*/
|
||||
target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
public annotation class inlineOptions(vararg val value: InlineOption)
|
||||
|
||||
@@ -72,15 +72,15 @@ public enum class AnnotationRetention {
|
||||
*
|
||||
* @property allowedTargets list of allowed annotation targets
|
||||
*/
|
||||
target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@MustBeDocumented
|
||||
public annotation class target(vararg val allowedTargets: AnnotationTarget)
|
||||
public annotation class Target(vararg val allowedTargets: AnnotationTarget)
|
||||
|
||||
/**
|
||||
* This special meta-annotation is used to declare an annotation.
|
||||
* So a class in Kotlin is an annotation if and only if it has the "annotation" meta-annotation.
|
||||
*/
|
||||
target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class annotation
|
||||
@@ -90,17 +90,17 @@ public annotation class annotation
|
||||
*
|
||||
* @property value necessary annotation retention (RUNTIME, BINARY or SOURCE)
|
||||
*/
|
||||
target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
public annotation class Retention(val value: AnnotationRetention = AnnotationRetention.RUNTIME)
|
||||
|
||||
/**
|
||||
* This meta-annotation determines that an annotation is applicable twice or more on a single code element
|
||||
*/
|
||||
target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
public annotation class Repeatable
|
||||
|
||||
/**
|
||||
* This meta-annotation determines that an annotation is a part of public API and therefore must be documented
|
||||
*/
|
||||
target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||
public annotation class MustBeDocumented
|
||||
Reference in New Issue
Block a user