@@ -19,30 +19,31 @@ class SuppressWarningsAnnotation extends Annotation {
1919 SuppressWarningsAnnotation ( ) { this .getType ( ) .hasQualifiedName ( "java.lang" , "SuppressWarnings" ) }
2020
2121 /**
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.
2526 */
26- StringLiteral getASuppressedWarningLiteral ( ) { result = this .getAnArrayValue ( "value" ) }
27+ deprecated StringLiteral getASuppressedWarningLiteral ( ) { result = this .getAnArrayValue ( "value" ) }
2728
2829 /** 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" ) }
3331}
3432
3533/** A `@Target` annotation. */
3634class TargetAnnotation extends Annotation {
3735 TargetAnnotation ( ) { this .getType ( ) .hasQualifiedName ( "java.lang.annotation" , "Target" ) }
3836
3937 /**
38+ * DEPRECATED: Getting the field access expression is rarely useful. Use `getATargetElementType()`
39+ * to get the name of the target element.
40+ *
4041 * Gets a target expression within this annotation.
4142 *
4243 * For example, the field access `ElementType.FIELD` is a target expression in
4344 * `@Target({ElementType.FIELD, ElementType.METHOD})`.
4445 */
45- Expr getATargetExpression ( ) { result = this .getAnArrayValue ( "value" ) }
46+ deprecated Expr getATargetExpression ( ) { result = this .getAnArrayValue ( "value" ) }
4647
4748 /**
4849 * Gets the name of a target element type.
0 commit comments