W3cubDocs

/Kotlin

Deprecated

@Target([AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.TYPEALIAS]) annotation class Deprecated

Marks the annotated class, function, property, variable or parameter as deprecated.

Constructors

<init>

Deprecated(
    message: String, 
    replaceWith: ReplaceWith = ReplaceWith(""), 
    level: DeprecationLevel = DeprecationLevel.WARNING)

Marks the annotated class, function, property, variable or parameter as deprecated.

Properties

level

val level: DeprecationLevel

message

val message: String

the message explaining the deprecation and recommending an alternative API to use.

replaceWith

val replaceWith: ReplaceWith

if present, specifies a code fragment which should be used as a replacement for the deprecated API usage.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-deprecated/index.html