diff --git a/src/commonMain/kotlin/org/jetbrains/annotations/Contract.kt b/src/commonMain/kotlin/org/jetbrains/annotations/Contract.kt index c5543aa..046cfa6 100644 --- a/src/commonMain/kotlin/org/jetbrains/annotations/Contract.kt +++ b/src/commonMain/kotlin/org/jetbrains/annotations/Contract.kt @@ -107,8 +107,7 @@ expect annotation class Contract( * "this,param1"Method mutates the receiver and first argument and doesn't mutate any other arguments * * - * **Warning: This annotation parameter is experimental and may be changed or removed without further notice!** * @return a mutation specifier string */ - @get:ApiStatus.Experimental @get:NonNls val mutates: String = "" + @get:NonNls val mutates: String = "" ) diff --git a/src/jvmMain/java/org/jetbrains/annotations/Contract.java b/src/jvmMain/java/org/jetbrains/annotations/Contract.java index 9846ba7..e1c116b 100644 --- a/src/jvmMain/java/org/jetbrains/annotations/Contract.java +++ b/src/jvmMain/java/org/jetbrains/annotations/Contract.java @@ -92,16 +92,17 @@ * Contains a specifier which describes which method parameters can be mutated during the method call. * * - * - * + * + * * - * + * + * + * *
Possible values:
"this"Method mutates the receiver object, and doesn't mutates any objects passed as arguments (cannot be applied for static method or constructor)
"param"Method mutates the sole argument and doesn't mutate the receiver object (if applicable)
"this"Method mutates the receiver object, and doesn't mutate any objects passed as arguments (cannot be applied for static method or constructor)
"param"Method mutates the sole argument and doesn't mutate the receiver object (if applicable) or anything else
"param1", "param2", ...Method mutates the N-th argument
"this,param1"Method mutates the receiver and first argument and doesn't mutate any other arguments
"io"Method performs input/output changing the outer world but does not mutate any observable program state
"this,param1"Method mutates the receiver and first argument and doesn't mutate any other arguments or observable program state
"io,this"Method performs input/output changing the outer world and mutates the receiver, but doesn't mutate any arguments or observable program state
* * Warning: This annotation parameter is experimental and may be changed or removed without further notice! * @return a mutation specifier string */ - @ApiStatus.Experimental @NonNls String mutates() default ""; } diff --git a/src/nonJvmMain/kotlin/org/jetbrains/annotations/Contract.kt b/src/nonJvmMain/kotlin/org/jetbrains/annotations/Contract.kt index a35289a..c90d6fc 100644 --- a/src/nonJvmMain/kotlin/org/jetbrains/annotations/Contract.kt +++ b/src/nonJvmMain/kotlin/org/jetbrains/annotations/Contract.kt @@ -106,8 +106,7 @@ actual annotation class Contract( * "this,param1"Method mutates the receiver and first argument and doesn't mutate any other arguments * * - * **Warning: This annotation parameter is experimental and may be changed or removed without further notice!** * @return a mutation specifier string */ - @get:ApiStatus.Experimental @get:NonNls actual val mutates: String = "" + @get:NonNls actual val mutates: String = "" )