Class Api

java.lang.Object
io.helidon.common.Api

public final class Api extends Object
Annotations used to describe and enforce Helidon API stability contracts.

Public top-level APIs in Helidon production modules are expected to declare exactly one stability annotation:

  • Api.Internal - Helidon implementation detail, not for external use
  • Api.Incubating - exploratory API that may change or be removed in any release
  • Api.Preview - supported but still evolving API that may change between minor releases
  • Api.Stable - supported API that is backward compatible within the current major version
Methods, constructors, and nested types may also declare their own stability annotations. The element's stability annotation must be lower than the one of the declaring type (or the same), using the order Api.Stable > Api.Preview > Api.Incubating > Api.Internal.

Deprecation is separate from stability. Use Deprecated together with the relevant stability annotation to indicate planned removal.

Consumers can suppress API-stability diagnostics with SuppressWarnings, using the constants provided here for stability annotations, deprecation for deprecated APIs, or SUPPRESS_ALL to suppress all Helidon API-stability diagnostics.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    An incubating API (type, method, or constructor).
    static @interface 
    An internal API (type, method, or constructor).
    static @interface 
    A preview API (type, method, or constructor).
    static @interface 
    API may add this annotation to mark the first Helidon version that contains the current contract.
    static @interface 
    Stable API.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Suppression constant to ignore any diagnostic reported by the Helidon API-stability processor.
    static final String
    Suppression constant to ignore any use of Helidon incubating APIs.
    static final String
    Suppression constant to ignore any use of Helidon internal APIs.
    static final String
    Suppression constant to ignore any use of Helidon preview APIs.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SUPPRESS_ALL

      public static final String SUPPRESS_ALL
      Suppression constant to ignore any diagnostic reported by the Helidon API-stability processor.
      See Also:
    • SUPPRESS_PREVIEW

      public static final String SUPPRESS_PREVIEW
      Suppression constant to ignore any use of Helidon preview APIs.
      See Also:
    • SUPPRESS_INCUBATING

      public static final String SUPPRESS_INCUBATING
      Suppression constant to ignore any use of Helidon incubating APIs.
      See Also:
    • SUPPRESS_INTERNAL

      public static final String SUPPRESS_INTERNAL
      Suppression constant to ignore any use of Helidon internal APIs.
      See Also: