File tree Expand file tree Collapse file tree
java/ql/lib/semmle/code/java Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -438,11 +438,17 @@ class SwitchCase extends Stmt, @case {
438438
439439 /**
440440 * 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.
441444 */
442445 Expr getRuleExpression ( ) { result .getParent ( ) = this and result .getIndex ( ) = - 1 }
443446
444447 /**
445448 * 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; ... }`.
446452 */
447453 Stmt getRuleStatement ( ) { result .getParent ( ) = this and result .getIndex ( ) = - 1 }
448454}
You can’t perform that action at this time.
0 commit comments