From 2c5680408cb9371bc7a160247007f1b985ad1f92 Mon Sep 17 00:00:00 2001 From: Anton Oellerer <13524304+AntonOellerer@users.noreply.github.com> Date: Wed, 22 May 2024 13:10:23 +0200 Subject: [PATCH] Add missing files --- .../annotations/DynamicAccessPlaceholder.java | 26 ++++++++++++++++++ .../templates/word/DynamicAccess.docx | Bin 0 -> 8870 bytes 2 files changed, 26 insertions(+) create mode 100644 src/main/java/com/docutools/jocument/annotations/DynamicAccessPlaceholder.java create mode 100644 src/test/resources/templates/word/DynamicAccess.docx diff --git a/src/main/java/com/docutools/jocument/annotations/DynamicAccessPlaceholder.java b/src/main/java/com/docutools/jocument/annotations/DynamicAccessPlaceholder.java new file mode 100644 index 0000000..1eeabdc --- /dev/null +++ b/src/main/java/com/docutools/jocument/annotations/DynamicAccessPlaceholder.java @@ -0,0 +1,26 @@ +package com.docutools.jocument.annotations; + +import com.docutools.jocument.impl.models.MatchPlaceholderData; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.util.Locale; + +/** + * Allows to define a regular expression pattern for a method to be resolved in a {@link com.docutools.jocument.impl.ReflectionResolver} if the + * placeholder name passed to {@link com.docutools.jocument.impl.ReflectionResolver#resolve(String, Locale)} matches against the {@link + * this#pattern()}. + * + *
Can be applied to a public method taking a {@link MatchPlaceholderData}, returning an {@link java.util.Optional} of {@link Object}.
+ *
+ * @author amp
+ * @since 2022-03-01
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface DynamicAccessPlaceholder {
+ /**
+ * A RegEx pattern.
+ *
+ * @return {@link String}
+ */
+ String pattern();
+}
diff --git a/src/test/resources/templates/word/DynamicAccess.docx b/src/test/resources/templates/word/DynamicAccess.docx
new file mode 100644
index 0000000000000000000000000000000000000000..61c0468682a7fd2c496c6da4b9788468c7f65385
GIT binary patch
literal 8870
zcmeHsWmKH&k~QuGx8UwH?(U5??(Qy)d$0s|cMCxS1b25$fC!cZ4IVTEn