CodeQL library for Java
codeql/java-all 0.6.2 ( changelog , source )
Search

Member predicate Annotation :: getAValue

DEPRECATED: Getting the value of any annotation element is error-prone because it could lead to selecting the value of the wrong element by accident (for example when an annotation type is extended in the future). Prefer the predicate getValue(string) and explicitly specify the element name. Use getValue(_) if it is really desired to get the value of any element.

Gets a value of an annotation element. This includes default values in case no explicit value is specified. For elements with an array value type this might have an ArrayInit as result. To properly handle array values, prefer the predicate getAnArrayValue.

Expr getAValue ( )