Annotation Type AutoOneOf


  • @Retention(CLASS)
    @Target(TYPE)
    public @interface AutoOneOf
    Specifies that the annotated class is a one-of class, also known as a tagged union. An @AutoOneOf class is very similar to an @AutoValue class, in that its abstract methods define a set of properties. But unlike @AutoValue, only one of those properties is defined in any given instance.
    {@code
    Author:
    Chris Nokleberg, Éamonn McManus
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Class<? extends Enum<?>> value
      Specifies an enum that has one entry per variant in the one-of.
    • Element Detail

      • value

        Class<? extends Enum<?>> value
        Specifies an enum that has one entry per variant in the one-of.