Skip to content

Commit 3c161f9

Browse files
committed
Make contract of RegexMatch clear
1 parent 1fefa98 commit 3c161f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

java/ql/lib/semmle/code/java/Concepts.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ private import semmle.code.java.frameworks.JavaxAnnotations
1414
*
1515
* Extend this class to refine existing API models. If you want to model new APIs,
1616
* extend `RegexMatch::Range` instead.
17+
*
18+
* These are either method calls, which return `true` when there is a match, or
19+
* annotations, which are considered to match if they are present.
1720
*/
1821
class RegexMatch extends Expr instanceof RegexMatch::Range {
1922
/** Gets the expression for the regex being executed by this node. */
@@ -36,6 +39,9 @@ module RegexMatch {
3639
*
3740
* Extend this class to model new APIs. If you want to refine existing API models,
3841
* extend `RegexMatch` instead.
42+
*
43+
* These are either method calls, which return `true` when there is a match, or
44+
* annotations, which are considered to match if they are present.
3945
*/
4046
abstract class Range extends Expr {
4147
/** Gets the expression for the regex being executed by this node. */

0 commit comments

Comments
 (0)