Top Description Methods
org.checkerframework.common.value.qual

public @Interface EnumVal

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:TYPE_PARAMETER, TYPE_USE
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

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.

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

the simple names of the possible enum values for an expression with the annotated type
value
()

The simple names of the possible enum values for an expression with the annotated type.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String[] value()

The simple names of the possible enum values for an expression with the annotated type.

Returns:String[]

the simple names of the possible enum values for an expression with the annotated type