Package org.apiguardian.api
Annotation Type API
-
@Target({TYPE,METHOD,CONSTRUCTOR,FIELD}) @Retention(RUNTIME) @Documented public @interface API
@API
is used to annotate public types, methods, constructors, and fields within a framework or application in order to publish theirstatus()
and level of stability and to indicate how they are intended to be used byconsumers()
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 aAPI.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)
.- Since:
- 1.0
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description API.Status
status
The current status of the API.
-
-
-
Element Detail
-
status
API.Status status
The current status of the API.
-
-
-
consumers
String[] consumers
List 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:
- {"*"}
-
-