File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
java/ql/lib/semmle/code/java Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -438,11 +438,17 @@ class SwitchCase extends Stmt, @case {
438
438
439
439
/**
440
440
* Gets the expression on the right-hand side of the arrow, if any.
441
+ *
442
+ * Note this is mutually exclusive with `getRuleStatement`: it gets a value
443
+ * when this case is of the form `case e1 -> e2`, where `e2` is not a block.
441
444
*/
442
445
Expr getRuleExpression ( ) { result .getParent ( ) = this and result .getIndex ( ) = - 1 }
443
446
444
447
/**
445
448
* Gets the statement on the right-hand side of the arrow, if any.
449
+ *
450
+ * Note this is mutually exclusive with `getRuleExpression`: it gets a value
451
+ * when this case if of the form `case e1 -> { s1; s2; ... }`.
446
452
*/
447
453
Stmt getRuleStatement ( ) { result .getParent ( ) = this and result .getIndex ( ) = - 1 }
448
454
}
You can’t perform that action at this time.
0 commit comments