Annotation Interface NonExhaustiveEnum


@Internal @Target(TYPE) public @interface NonExhaustiveEnum
Signifies that an enum is not exhaustive, and additional values may be added while NeoForge is stable.
Care should be taken to ensure no reliance on the specific number or order of values in a tagged enum.

Do not rely on the number of values.
Do not rely on the ordinal of a specific value.
Do not use in a switch without a default case.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    This is done as an annotation member to preserve the comment without sources attached.
  • Element Details

    • reason

      String reason
      This is done as an annotation member to preserve the comment without sources attached.