Standard annotations: must be documented

This commit is contained in:
Mikhail Glukhikh
2015-08-05 13:50:33 +03:00
parent 5b31560808
commit bd3b5690a2
8 changed files with 26 additions and 26 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ import kotlin.annotation.AnnotationRetention.*
* for more information.
*/
target(CLASSIFIER)
public annotation class data
public annotation(mustBeDocumented = true) class data
/**
* Marks the annotated class, function, property, variable or parameter as deprecated.
@@ -37,7 +37,7 @@ public annotation class data
*/
target(CLASSIFIER, FUNCTION, PROPERTY, ANNOTATION_CLASS, CONSTRUCTOR, PROPERTY_SETTER, PROPERTY_GETTER,
LOCAL_VARIABLE, FIELD, VALUE_PARAMETER)
public annotation class deprecated(val value: String, val replaceWith: ReplaceWith = ReplaceWith(""))
public annotation(mustBeDocumented = true) class deprecated(val value: String, val replaceWith: ReplaceWith = ReplaceWith(""))
/**
* Specifies a code fragment that can be used to replace a deprecated function or property. Tools such
@@ -53,13 +53,13 @@ public annotation class deprecated(val value: String, val replaceWith: ReplaceWi
* replacement expression to be resolved correctly.
*/
target()
public annotation(retention = BINARY) class ReplaceWith(val expression: String, vararg val imports: String)
public annotation(retention = BINARY, mustBeDocumented = true) class ReplaceWith(val expression: String, vararg val imports: String)
/**
* Signifies that the annotated functional type represents an extension function.
*/
target(TYPE)
public annotation class extension
public annotation(mustBeDocumented = true) class extension
/**
* Suppresses the given compilation warnings in the annotated element.
+3 -3
View File
@@ -21,7 +21,7 @@ package kotlin
* function literals passed as arguments for this parameter.
*/
target(AnnotationTarget.VALUE_PARAMETER)
public annotation(retention = AnnotationRetention.RUNTIME) class noinline
public annotation(retention = AnnotationRetention.RUNTIME, mustBeDocumented = true) class noinline
/**
* Enables inlining of the annotated function and the function literals that it takes as parameters into the
@@ -35,7 +35,7 @@ public annotation(retention = AnnotationRetention.RUNTIME) class noinline
* @see inlineOptions
*/
target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
public annotation(retention = AnnotationRetention.RUNTIME) class inline(public val strategy: InlineStrategy = InlineStrategy.AS_FUNCTION)
public annotation(retention = AnnotationRetention.RUNTIME, mustBeDocumented = true) class inline(public val strategy: InlineStrategy = InlineStrategy.AS_FUNCTION)
/**
* Specifies the strategy for code generation for an inline function.
@@ -64,7 +64,7 @@ public enum class InlineStrategy {
* @property value the inlining options selected for the annotated function parameter.
*/
target(AnnotationTarget.VALUE_PARAMETER)
public annotation(retention = AnnotationRetention.RUNTIME) class inlineOptions(vararg val value: InlineOption)
public annotation(retention = AnnotationRetention.RUNTIME, mustBeDocumented = true) class inlineOptions(vararg val value: InlineOption)
/**
* Specifies the control flow statements which are allowed to be used for non-local control flow transfer in a lambda
@@ -75,7 +75,7 @@ public enum class AnnotationRetention {
* @property allowedTargets list of allowed annotation targets
*/
target(AnnotationTarget.ANNOTATION_CLASS)
public annotation class target(vararg val allowedTargets: AnnotationTarget)
public annotation(mustBeDocumented = true) class target(vararg val allowedTargets: AnnotationTarget)
/**
* This special meta-annotation is used to declare an annotation and to set its base properties.
@@ -86,7 +86,7 @@ public annotation class target(vararg val allowedTargets: AnnotationTarget)
* @property mustBeDocumented true if annotation is a part of public API and therefore must be documented, otherwise false (default)
*/
target(AnnotationTarget.ANNOTATION_CLASS)
public annotation(retention = AnnotationRetention.SOURCE) class annotation (
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class annotation (
val retention: AnnotationRetention = AnnotationRetention.RUNTIME,
val repeatable: Boolean = false,
val mustBeDocumented: Boolean = false