DeprecatedSinceKotlin

@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.TYPEALIAS])
annotation class DeprecatedSinceKotlin(    val warningSince: String = "",     val errorSince: String = "",     val hiddenSince: String = "")

Marks the annotated declaration as deprecated. In contrast to Deprecated, severity of the reported diagnostic is not a constant value, but differs depending on the API version of the usage (the value of the -api-version argument when compiling the module where the usage is located). If the API version is greater or equal than hiddenSince, the declaration will not be accessible from the code (as if it was deprecated with level DeprecationLevel.HIDDEN), otherwise if the API version is greater or equal than errorSince, the usage will be marked as an error (as with DeprecationLevel.ERROR), otherwise if the API version is greater or equal than warningSince, the usage will be marked as a warning (as with DeprecationLevel.WARNING), otherwise the annotation is ignored.

Since Kotlin

1.4
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.TYPEALIAS])
annotation class DeprecatedSinceKotlin(    val warningSince: String = "",     val errorSince: String = "",     val hiddenSince: String = "")

Marks the annotated declaration as deprecated. In contrast to Deprecated, severity of the reported diagnostic is not a constant value, but differs depending on the API version of the usage (the value of the -api-version argument when compiling the module where the usage is located). If the API version is greater or equal than hiddenSince, the declaration will not be accessible from the code (as if it was deprecated with level DeprecationLevel.HIDDEN), otherwise if the API version is greater or equal than errorSince, the usage will be marked as an error (as with DeprecationLevel.ERROR), otherwise if the API version is greater or equal than warningSince, the usage will be marked as a warning (as with DeprecationLevel.WARNING), otherwise the annotation is ignored.

Since Kotlin

1.4
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.TYPEALIAS])
annotation class DeprecatedSinceKotlin(    val warningSince: String = "",     val errorSince: String = "",     val hiddenSince: String = "")

Marks the annotated declaration as deprecated. In contrast to Deprecated, severity of the reported diagnostic is not a constant value, but differs depending on the API version of the usage (the value of the -api-version argument when compiling the module where the usage is located). If the API version is greater or equal than hiddenSince, the declaration will not be accessible from the code (as if it was deprecated with level DeprecationLevel.HIDDEN), otherwise if the API version is greater or equal than errorSince, the usage will be marked as an error (as with DeprecationLevel.ERROR), otherwise if the API version is greater or equal than warningSince, the usage will be marked as a warning (as with DeprecationLevel.WARNING), otherwise the annotation is ignored.

Since Kotlin

1.4

Constructors

Link copied to clipboard
fun DeprecatedSinceKotlin(    warningSince: String = "",     errorSince: String = "",     hiddenSince: String = "")
fun DeprecatedSinceKotlin(    warningSince: String = "",     errorSince: String = "",     hiddenSince: String = "")
fun DeprecatedSinceKotlin(    warningSince: String = "",     errorSince: String = "",     hiddenSince: String = "")

Properties

Link copied to clipboard

the version, since which this deprecation should be reported as a error.

the version, since which this deprecation should be reported as a error.

the version, since which this deprecation should be reported as a error.

Link copied to clipboard

the version, since which the annotated declaration should not be available in code.

the version, since which the annotated declaration should not be available in code.

the version, since which the annotated declaration should not be available in code.

Link copied to clipboard

the version, since which this deprecation should be reported as a warning.

the version, since which this deprecation should be reported as a warning.

the version, since which this deprecation should be reported as a warning.