Package org.kiwiproject.base
Annotation Interface KiwiDeprecated
@Documented
@Retention(RUNTIME)
@Target({CONSTRUCTOR,FIELD,LOCAL_VARIABLE,METHOD,PACKAGE,MODULE,PARAMETER,TYPE})
public @interface KiwiDeprecated
A Kiwi-flavored version of
Deprecated that includes the since attribute added in JDK 9 plus
additional attributes we think are useful.
At the very least, users should populate the since and removeAt attributes.
- Implementation Note:
- JDK 9 added a
forRemovalattribute, but since this is intended for things we plan to remove, and because we have theremoveAtattribute, we omittedforRemovalas redundant.
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]The issue number or other reference or descriptor which caused or is related to the deprecation, if any.The anticipated version at which the annotated element will be removed.String[]A description of what feature(s) replaces the one being deprecated, if any.The version the annotated element became deprecated.Indication of potential for problems if the deprecated feature continues to be used by callers, clients, etc.
-
Element Details
-
since
String sinceThe version the annotated element became deprecated.- Returns:
- the version when the annotated was deprecated
- Default:
- ""
-
removeAt
String removeAtThe anticipated version at which the annotated element will be removed.- Returns:
- the anticipated version when the annotated element will be removed
- Default:
- ""
-
replacedBy
String[] replacedByA description of what feature(s) replaces the one being deprecated, if any.For example, a text description of a replacement REST endpoint such as:
GET /foo/bar/{id}or the name of one or more replacement methods.- Returns:
- a description of the replacement, if any
- Default:
- {""}
-
reference
String[] referenceThe issue number or other reference or descriptor which caused or is related to the deprecation, if any.For example, one or more JIRA issue numbers.
- Returns:
- a reference to an issue, ticket, or other descriptor
- Default:
- {""}
-
usageSeverity
KiwiDeprecated.Severity usageSeverityIndication of potential for problems if the deprecated feature continues to be used by callers, clients, etc.- Returns:
- the severity of continued usage
- Default:
- WARN
-