Deprecated

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

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.