Annotation Type InternalExtensionOnly


Indicates a public API that is stable for callers to use, but has no guarantee of stability for extension. Consequently, the API should only be extended within the package containing the API.

For example:

  • An interface marked with this annotation can have new methods added to it.
  • A non-final class with this annotation can be marked final.
  • A class with this annotation can have new abstract methods added.
  • a non-final method with this annotation can be marked final.

The list above is just for illustration purposes and is not exhaustive.

Adding this annotation to an API is considered API-breaking.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Context information on why the interface/class is annotated with InternalExtensionOnly.
  • Element Details

    • value

      String value
      Context information on why the interface/class is annotated with InternalExtensionOnly.
      Default:
      ""