@@ -19,30 +19,31 @@ class SuppressWarningsAnnotation extends Annotation {
19
19
SuppressWarningsAnnotation ( ) { this .getType ( ) .hasQualifiedName ( "java.lang" , "SuppressWarnings" ) }
20
20
21
21
/**
22
- * Gets the `StringLiteral` of a warning suppressed by this annotation. To get the name of a suppressed
23
- * warning, prefer `getASuppressedWarning()`. That predicate considers more cases because it does not
24
- * restrict results to `StringLiteral`.
22
+ * DEPRECATED: This predicate restricts the results to `StringLiteral`; prefer `getASuppressedWarning()`
23
+ * to get the name of a suppressed warning.
24
+ *
25
+ * Gets the `StringLiteral` of a warning suppressed by this annotation.
25
26
*/
26
- StringLiteral getASuppressedWarningLiteral ( ) { result = this .getAnArrayValue ( "value" ) }
27
+ deprecated StringLiteral getASuppressedWarningLiteral ( ) { result = this .getAnArrayValue ( "value" ) }
27
28
28
29
/** Gets the name of a warning suppressed by this annotation. */
29
- string getASuppressedWarning ( ) {
30
- // Don't use getASuppressedWarningLiteral() because that restricts results to StringLiteral
31
- result = this .getAStringArrayValue ( "value" )
32
- }
30
+ string getASuppressedWarning ( ) { result = this .getAStringArrayValue ( "value" ) }
33
31
}
34
32
35
33
/** A `@Target` annotation. */
36
34
class TargetAnnotation extends Annotation {
37
35
TargetAnnotation ( ) { this .getType ( ) .hasQualifiedName ( "java.lang.annotation" , "Target" ) }
38
36
39
37
/**
38
+ * DEPRECATED: Getting the field access expression is rarely useful. Use `getATargetElementType()`
39
+ * to get the name of the target element.
40
+ *
40
41
* Gets a target expression within this annotation.
41
42
*
42
43
* For example, the field access `ElementType.FIELD` is a target expression in
43
44
* `@Target({ElementType.FIELD, ElementType.METHOD})`.
44
45
*/
45
- Expr getATargetExpression ( ) { result = this .getAnArrayValue ( "value" ) }
46
+ deprecated Expr getATargetExpression ( ) { result = this .getAnArrayValue ( "value" ) }
46
47
47
48
/**
48
49
* Gets the name of a target element type.
0 commit comments