Annotation Interface EnumVal
An annotation indicating the possible values for an enum type. If an expression's type has this
annotation, then at run time, the expression evaluates to one of the enum values named by the
arguments. EnumVal uses the simple name of the enum value: the EnumVal type corresponding to
MyEnum.MY_VALUE
is @EnumVal("MY_VALUE")
.
This annotation is treated as StringVal
internally by the Constant Value Checker.
- See the Checker Framework Manual:
- Constant Value Checker
-
Required Element Summary
-
Element Details
-
value
String[] valueThe simple names of the possible enum values for an expression with the annotated type.- Returns:
- the simple names of the possible enum values for an expression with the annotated type
-