aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/Tolerate.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before/Tolerate.java')
-rw-r--r--test/transform/resource/before/Tolerate.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/transform/resource/before/Tolerate.java b/test/transform/resource/before/Tolerate.java
new file mode 100644
index 00000000..d1744aa6
--- /dev/null
+++ b/test/transform/resource/before/Tolerate.java
@@ -0,0 +1,23 @@
+import java.util.regex.Pattern;
+
+@lombok.Setter @lombok.Getter
+class Tolerate {
+ private Pattern pattern;
+
+ @lombok.experimental.Tolerate public void setPattern(String pattern) {
+ setPattern(Pattern.compile(pattern));
+ }
+}
+
+@lombok.Getter @lombok.experimental.Wither @lombok.AllArgsConstructor
+class Tolerate2 {
+ private final Pattern pattern;
+
+ @lombok.experimental.Tolerate public Tolerate2 withPattern(String pattern) {
+ return withPattern(Pattern.compile(pattern));
+ }
+
+ public Tolerate2 withPattern(String nameGlob, String extensionGlob) {
+ return withPattern(nameGlob.replace("*", ".*") + "\\." + extensionGlob.replace("*", ".*"));
+ }
+}