Annotation Interface DefaultEnum


@Retention(RUNTIME) @Target({METHOD,TYPE_USE}) public @interface DefaultEnum
Provides the default enum value that should be used for a method which returns a Java enum or the type argument of an Optional where that type is an enum.

The value must be provided as the exact name of the enum constant (as it would've been returned by calling Enum.name()).

This annotation must not be used on methods returning anything other than an enum value.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Element Details