Annotation Interface KindHint


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface KindHint
Marker to advise the "kind" of the implementation when used with a sealed-type hierarchy.
Since:
4.1.0
Author:
Ashley Scopes
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The implementation that the kind should point to.
    The kind of the implementation.
  • Element Details

    • kind

      String kind
      The kind of the implementation.
      Returns:
      the kind.
    • implementation

      Class<?> implementation
      The implementation that the kind should point to.

      This is needed until GH-880 can be merged, as we cannot easily infer the immutable implementation class from the base when working with the Immutables library. GH-880 will enable better integration with that library based on compile-time metadata that avoids this issue. We may just need to include this annotation in Value.Style.passAnnotations() to achieve this correctly closer to the time.

      Returns:
      the implementation type.