Annotation Interface API
@API is used to annotate public types, methods, constructors, and
fields within a framework or application in order to publish their
status() and level of stability and to indicate how they are intended
to be used by consumers() of the API.
If @API is present on a type, it is considered to hold for all
public members of the type as well. However, a member of such an annotated
type is allowed to declare a API.Status of lower stability. For example,
a class annotated with @API(status = STABLE) may declare a constructor
for internal usage that is annotated with @API(status = INTERNAL).
If @API is present on a package, it is considered to hold for all
public types in its package. The same rules for lowered stability apply as
if they were specified on a type.
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndicates the status of an API element and therefore its level of stability as well. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
status
API.Status statusThe current status of the API. -
since
String sinceThe version of the API when thestatus()was last changed.Defaults to an empty string, signifying that the since version is unknown.
- Default:
- ""
-
consumers
String[] consumersList of packages belonging to intended consumers.The supplied packages can be fully qualified package names or patterns containing asterisks that will be used as wildcards.
Defaults to
"*", signifying that the API is intended to be consumed by any package.- Default:
- {"*"}
-