Java 12: add more QL deprecated annotations

This commit is contained in:
yh-semmle
2019-04-09 12:20:21 -04:00
parent 0a569f6c1a
commit f22084e18a

View File

@@ -1100,28 +1100,28 @@ class ConditionalExpr extends Expr, @conditionalexpr {
*/
deprecated class SwitchExpr extends Expr, @switchexpr {
/** Gets an immediate child statement of this `switch` expression. */
Stmt getAStmt() { result.getParent() = this }
deprecated Stmt getAStmt() { result.getParent() = this }
/**
* Gets the immediate child statement of this `switch` expression
* that occurs at the specified (zero-based) position.
*/
Stmt getStmt(int index) { result = this.getAStmt() and result.getIndex() = index }
deprecated Stmt getStmt(int index) { result = this.getAStmt() and result.getIndex() = index }
/**
* Gets a case of this `switch` expression,
* which may be either a normal `case` or a `default`.
*/
SwitchCase getACase() { result = getAConstCase() or result = getDefaultCase() }
deprecated SwitchCase getACase() { result = getAConstCase() or result = getDefaultCase() }
/** Gets a (non-default) `case` of this `switch` expression. */
ConstCase getAConstCase() { result.getParent() = this }
deprecated ConstCase getAConstCase() { result.getParent() = this }
/** Gets the `default` case of this switch expression, if any. */
DefaultCase getDefaultCase() { result.getParent() = this }
deprecated DefaultCase getDefaultCase() { result.getParent() = this }
/** Gets the expression of this `switch` expression. */
Expr getExpr() { result.getParent() = this }
deprecated Expr getExpr() { result.getParent() = this }
/** Gets a result expression of this `switch` expression. */
deprecated Expr getAResult() {