@Target(value={TYPE,METHOD,CONSTRUCTOR,FIELD})
@Retention(value=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 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).
| Modifier and Type | Required Element and Description |
|---|---|
API.Status |
status
The current status of the API.
|
public abstract API.Status status
public abstract java.lang.String since
status() was last changed.
Defaults to an empty string, signifying that the since version is unknown.
public abstract java.lang.String[] 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.