Deprecated (original) (raw)

Marks the annotated declaration as deprecated.

A deprecated API element is not recommended to use, typically because it's being phased out or a better alternative exists.

To help removing deprecated API gradually, the property level could be used. Usually a gradual phase-out goes through the "warning", then "error", then "hidden" or "removed" stages:

Since Kotlin

1.0

Properties

Specifies how the deprecated element usages are reported in code. See the DeprecationLevel enum for the possible values.

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

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