1 | package pro.verron.officestamper.core; | |
2 | ||
3 | import pro.verron.officestamper.api.Placeholder; | |
4 | ||
5 | /** | |
6 | * Represents an expression with a configured Matcher. | |
7 | */ | |
8 | public record StandardPlaceholder( | |
9 | Matcher matcher, | |
10 | String expression | |
11 | ) | |
12 | implements Placeholder { | |
13 | /** | |
14 | * Returns the inner part of the expression | |
15 | * by stripping the prefix and suffix. | |
16 | * | |
17 | * @return the inner part of the expression. | |
18 | */ | |
19 | @Override | |
20 | public String content() { | |
21 |
2
1. content : negated conditional → KILLED 2. content : replaced return value with "" for pro/verron/officestamper/core/StandardPlaceholder::content → KILLED |
return matcher.match(expression) |
22 | ? matcher.strip(expression) | |
23 | : expression; | |
24 | } | |
25 | } | |
Mutations | ||
21 |
1.1 2.2 |