Annotation Type 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 forRemoval attribute, but since this is intended for things we plan to remove, and because we have the removeAt attribute, we omitted forRemoval as redundant.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String[] reference
      The issue number or other reference or descriptor which caused or is related to the deprecation, if any.
      String removeAt
      The anticipated version at which the annotated element will be removed.
      String[] replacedBy
      A description of what feature(s) replaces the one being deprecated, if any.
      String since
      The version the annotated element became deprecated.
      KiwiDeprecated.Severity usageSeverity
      Indication of potential for problems if the deprecated feature continues to be used by callers, clients, etc.
    • Element Detail

      • since

        String since
        The version the annotated element became deprecated.
        Returns:
        the version when the annotated was deprecated
        Default:
        ""
      • removeAt

        String removeAt
        The anticipated version at which the annotated element will be removed.
        Returns:
        the anticipated version when the annotated element will be removed
        Default:
        ""
      • replacedBy

        String[] replacedBy
        A 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[] reference
        The 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 usageSeverity
        Indication of potential for problems if the deprecated feature continues to be used by callers, clients, etc.
        Returns:
        the severity of continued usage
        Default:
        org.kiwiproject.base.KiwiDeprecated.Severity.WARN