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
+7 -7
View File
@@ -1091,7 +1091,7 @@ public interface Range</*0*/ T : kotlin.Comparable<T>> {
public open fun isEmpty(): kotlin.Boolean
}
kotlin.annotation.target(allowedTargets = {}) kotlin.annotation.annotation(retention = AnnotationRetention.BINARY) public final class ReplaceWith : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.BINARY) public final class ReplaceWith : kotlin.Annotation {
/*primary*/ public constructor ReplaceWith(/*0*/ expression: kotlin.String, /*1*/ vararg imports: kotlin.String /*kotlin.Array<out kotlin.String>*/)
internal final val expression: kotlin.String
internal final fun <get-expression>(): kotlin.String
@@ -1261,11 +1261,11 @@ public object Unit {
/*primary*/ private constructor Unit()
}
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.annotation() public final class data : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER}) kotlin.annotation.annotation(mustBeDocumented = true) public final class data : kotlin.Annotation {
/*primary*/ public constructor data()
}
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation() public final class deprecated : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(mustBeDocumented = true) public final class deprecated : kotlin.Annotation {
/*primary*/ public constructor deprecated(/*0*/ value: kotlin.String, /*1*/ replaceWith: kotlin.ReplaceWith = ...)
internal final val replaceWith: kotlin.ReplaceWith
internal final fun <get-replaceWith>(): kotlin.ReplaceWith
@@ -1273,23 +1273,23 @@ kotlin.annotation.target(allowedTargets = {AnnotationTarget.CLASSIFIER, Annotati
internal final fun <get-value>(): kotlin.String
}
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation() public final class extension : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {AnnotationTarget.TYPE}) kotlin.annotation.annotation(mustBeDocumented = true) public final class extension : kotlin.Annotation {
/*primary*/ public constructor extension()
}
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) kotlin.annotation.annotation(retention = AnnotationRetention.RUNTIME) public final class inline : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.RUNTIME) public final class inline : kotlin.Annotation {
/*primary*/ public constructor inline(/*0*/ strategy: kotlin.InlineStrategy = ...)
public final val strategy: kotlin.InlineStrategy
public final fun <get-strategy>(): kotlin.InlineStrategy
}
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(retention = AnnotationRetention.RUNTIME) public final class inlineOptions : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.RUNTIME) public final class inlineOptions : kotlin.Annotation {
/*primary*/ public constructor inlineOptions(/*0*/ vararg value: kotlin.InlineOption /*kotlin.Array<out kotlin.InlineOption>*/)
internal final val value: kotlin.Array<out kotlin.InlineOption>
internal final fun <get-value>(): kotlin.Array<out kotlin.InlineOption>
}
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(retention = AnnotationRetention.RUNTIME) public final class noinline : kotlin.Annotation {
kotlin.annotation.target(allowedTargets = {AnnotationTarget.VALUE_PARAMETER}) kotlin.annotation.annotation(mustBeDocumented = true, retention = AnnotationRetention.RUNTIME) public final class noinline : kotlin.Annotation {
/*primary*/ public constructor noinline()
}
+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
@@ -35,4 +35,4 @@ package kotlin.jvm
* MyList<Int?>().add(null) // Ok
*/
target(AnnotationTarget.CLASSIFIER)
public annotation(retention = AnnotationRetention.RUNTIME) class PurelyImplements(public val value: String)
public annotation(retention = AnnotationRetention.RUNTIME, mustBeDocumented = true) class PurelyImplements(public val value: String)
@@ -23,14 +23,14 @@ import kotlin.annotation.AnnotationTarget.*
* are immediately made visible to other threads.
*/
target(PROPERTY, FIELD)
public annotation(retention = AnnotationRetention.SOURCE) class volatile
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class volatile
/**
* Marks the JVM backing field of the annotated property as `transient`, meaning that it is not
* part of the default serialized form of the object.
*/
target(PROPERTY, FIELD)
public annotation(retention = AnnotationRetention.SOURCE) class transient
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class transient
/**
* Marks the JVM method generated from the annotated function as `strictfp`, meaning that the precision
@@ -38,7 +38,7 @@ public annotation(retention = AnnotationRetention.SOURCE) class transient
* achieve better portability.
*/
target(FUNCTION, CONSTRUCTOR, PROPERTY, PROPERTY_GETTER, PROPERTY_SETTER, CLASSIFIER)
public annotation(retention = AnnotationRetention.SOURCE) class strictfp
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class strictfp
/**
* Marks the JVM method generated from the annotated function as `synchronized`, meaning that the method
@@ -46,11 +46,11 @@ public annotation(retention = AnnotationRetention.SOURCE) class strictfp
* for static methods, the class) on which the method is defined.
*/
target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
public annotation(retention = AnnotationRetention.SOURCE) class synchronized
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class synchronized
/**
* Marks the JVM method generated from the annotated function as `native`, meaning that it's not implemented
* in Java but rather in a different language (for example, in C/C++ using JNI).
*/
target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
public annotation(retention = AnnotationRetention.SOURCE) class native
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class native
@@ -23,10 +23,10 @@ package kotlin.jvm
* takes N-1 parameters (all but the last one that takes a default value), the second takes N-2 parameters, and so on.
*/
target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR)
public annotation(retention = AnnotationRetention.BINARY) class jvmOverloads
public annotation(retention = AnnotationRetention.BINARY, mustBeDocumented = true) class jvmOverloads
/**
* Instructs the Kotlin compiler to generate a public backing field for this property.
*/
target(AnnotationTarget.PROPERTY)
public annotation(retention = AnnotationRetention.SOURCE) class publicField
public annotation(retention = AnnotationRetention.SOURCE, mustBeDocumented = true) class publicField
@@ -26,7 +26,7 @@ import kotlin.annotation.AnnotationTarget.*
* @property name the name of the element.
*/
target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
public annotation(retention = AnnotationRetention.RUNTIME) class platformName(public val name: String)
public annotation(retention = AnnotationRetention.RUNTIME, mustBeDocumented = true) class platformName(public val name: String)
/**
* Specifies that a static method or field needs to be generated from this element.
@@ -34,4 +34,4 @@ public annotation(retention = AnnotationRetention.RUNTIME) class platformName(pu
* for more information.
*/
target(FUNCTION, PROPERTY, FIELD, PROPERTY_GETTER, PROPERTY_SETTER)
public annotation(retention = AnnotationRetention.RUNTIME) class platformStatic
public annotation(retention = AnnotationRetention.RUNTIME, mustBeDocumented = true) class platformStatic