Skip to content

Commit

Permalink
Updated the README with the two new stop method categories
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarlvp committed Feb 28, 2019
1 parent 2a1761f commit 6b6a20b
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,19 +317,21 @@ To configure the stop methods under consideration Descartes provide a `STOP_METH
This feature is enabled by default. The parameter `exclude` can be used to prevent certain methods to be treated as stop methods and bring them back to the analysis. This parameter can take any of the following values:


|`exclude` | Method description | Example |
|--------------|----------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| `empty` | `void` methods with no instruction. | `public void m() {}` |
| `enum` | Methods generated by the compiler to support enum types (`values` and `valueOf`). | |
| `to_string` | `toString` methods. | |
| `hash_code` | `hashCode` methods. | |
| `deprecated` | Methods annotated with `@Deprecated` or belonging to a class with the same annotation. | `@Deprecated public void m() {...}` |
| `synthetic` | Methods generated by the compiler. | |
| `getter` | Simple getters. | `public int getAge() { return this.age; }` |
| `setter` | Simple setters. | `public void setAge(int value) { this.age = value; }` |
| `constant` | Methods returning a literal constant. | `public double getPI() { return 3.14; }` |
| `delegate` | Methods implementing simple delegation. | `public int sum(int[] a, int i, int j) {return this.adder(a, i, j); }` |
| `clinit` | Static class initializers. | |
|`exclude` | Method description | Example |
|----------------|----------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| `empty` | `void` methods with no instruction. | `public void m() {}` |
| `enum` | Methods generated by the compiler to support enum types (`values` and `valueOf`). | |
| `to_string` | `toString` methods. | |
| `hash_code` | `hashCode` methods. | |
| `deprecated` | Methods annotated with `@Deprecated` or belonging to a class with the same annotation. | `@Deprecated public void m() {...}` |
| `synthetic` | Methods generated by the compiler. | |
| `getter` | Simple getters. | `public int getAge() { return this.age; }` |
| `setter` | Simple setters. | `public void setAge(int value) { this.age = value; }` |
| `constant` | Methods returning a literal constant. | `public double getPI() { return 3.14; }` |
| `delegate` | Methods implementing simple delegation. | `public int sum(int[] a, int i, int j) {return this.adder(a, i, j); }` |
| `clinit` | Static class initializers. | |
| `return_this` | Methods that only return `this`. | `class A { public A m() { return this; } }` |
| `return_param` | Methods that only return the value of a real parameter | `public int m(int x, int y) { return y; }` |

So, for example, if we don't want to exclude deprecated methods and mutate them the following snippet should be added under the `configuration` element:
Expand Down

0 comments on commit 6b6a20b

Please sign in to comment.