CodeQL library for Java/Kotlin
codeql/java-all 1.1.0 (changelog, source)

Member predicate Annotation::getEnumConstantValue

If the value type of the annotation element with the specified name is an enum type, gets the enum constant used as value for that element. This includes default values in case no explicit value is specified.

If the element value type is an enum type array, use getAnEnumConstantArrayValue.

EnumConstant getEnumConstantValue(string name)