JetBrains / java-annotations

Annotations for JVM-based languages.
Apache License 2.0
404 stars 47 forks source link

Alternative for Kotlin's `replaceWith` #59

Open kezz opened 3 years ago

kezz commented 3 years ago

It would be really nice to have an annotation, perhaps @ApiStatus.SuggestedAlternative, @ApiStatus.UseInstead or @ApiStatus.ReplaceWith that used the same internal logic as Kotlin's deprecation system to allow Java developers to provide alternatives to deprecated elements that can be picked up by an IDE.

vlsi commented 2 years ago

See also: http://errorprone.info/docs/inlineme

CheeseTastisch commented 2 years ago

It's nice that such a function exists in another API, but it would be better if all possible functions are combined in one API, because then you only have to include one.