Annotation Type API


  • @Target({TYPE,METHOD,CONSTRUCTOR,FIELD})
    @Retention(CLASS)
    @Documented
    public @interface API
    An annotation used on public types, fields, and methods to indicate their level of stability for consumers of the API. If a class or interface is annotated with API, all of its fields and methods are considered to have that same level of stability by default. However, this may be changed by annotating a member explicitly. An API may have its stability status become more stable (see API.Status) at any time, including before the next minor release. However, an API must not become less stable in the next minor release. Each stability status must specify how API elements with that status may become less stable (e.g., with the next minor release, with next major release). The key words "must", "must not", "require", "shall", "shall not", "should", "should not", and "may" in this document are to be interpreted as described in RFC 2119.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      API.Status value
      Return the API.Status of the API element.
    • Element Detail

      • value

        API.Status value
        Return the API.Status of the API element.
        Returns:
        the current stability status of the annotated element