@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 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.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | API.
Indicates the status of an API element and therefore its level of stability as well. |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | |
| public String | |
| public API. |
| consumers | back to summary |
|---|---|
| public 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 | |
| since | back to summary |
|---|---|
| public String since() The version of the API when the Defaults to an empty string, signifying that the since version is unknown. | |
| status | back to summary |
|---|---|
| public API. The current status of the API. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final API. | DEPRECATED
Should no longer be used. |
| public static final API. | EXPERIMENTAL
Intended for new, experimental features where the publisher of the API is looking for feedback. |
| public static final API. | INTERNAL
Must not be used by any external code. |
| public static final API. | MAINTAINED
Intended for features that will not be changed in a backwards-incompatible way for at least the next minor release of the current major version. |
| public static final API. | STABLE
Intended for features that will not be changed in a backwards-incompatible way in the current major version. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static API. | |
| public static API. |
| DEPRECATED | back to summary |
|---|---|
| public static final API. Should no longer be used. Might disappear in the next minor release. This status is usually used in combination with the standard annotation
| |
| EXPERIMENTAL | back to summary |
|---|---|
| public static final API. Intended for new, experimental features where the publisher of the API is looking for feedback. Use with caution. Might be promoted to | |
| INTERNAL | back to summary |
|---|---|
| public static final API. Must not be used by any external code. Might be removed without prior notice. | |
| MAINTAINED | back to summary |
|---|---|
| public static final API. Intended for features that will not be changed in a backwards-incompatible
way for at least the next minor release of the current major version.
If scheduled for removal, such a feature will be demoted to
| |
| STABLE | back to summary |
|---|---|
| public static final API. Intended for features that will not be changed in a backwards-incompatible way in the current major version. | |
| Status | back to summary |
|---|---|
| private Status() | |
| valueOf | back to summary |
|---|---|
| public static API. | |
| values | back to summary |
|---|---|
| public static API. | |