summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-05-03 16:42:16 +0200
committer zaaarf <zaaarf@proton.me>2023-05-03 16:42:16 +0200
commit34f8ded1a8b6dd73af485bd15ef6988ca67c1a6a (patch)
tree24329c7fbb8723251caf0bc6690c0fbbba85bca9 /src
parent999f0500c73b21186b9a52a98b2984649edc166b (diff)
chore: make MultipleTargets into a subclass of Target
Diffstat (limited to 'src')
-rw-r--r--src/main/java/ftbsc/lll/processor/annotations/MultipleTargets.java19
-rw-r--r--src/main/java/ftbsc/lll/processor/annotations/Target.java15
2 files changed, 14 insertions, 20 deletions
diff --git a/src/main/java/ftbsc/lll/processor/annotations/MultipleTargets.java b/src/main/java/ftbsc/lll/processor/annotations/MultipleTargets.java
deleted file mode 100644
index aa37530..0000000
--- a/src/main/java/ftbsc/lll/processor/annotations/MultipleTargets.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package ftbsc.lll.processor.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Repeatable;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Used to support {@link Target} as a {@link Repeatable} annotation.
- * @since 0.5.0
- */
-@Retention(RetentionPolicy.CLASS)
-@java.lang.annotation.Target(ElementType.METHOD)
-public @interface MultipleTargets {
- /**
- * @return the {@link Injector} annotations, as an array
- */
- Target[] value();
-}
diff --git a/src/main/java/ftbsc/lll/processor/annotations/Target.java b/src/main/java/ftbsc/lll/processor/annotations/Target.java
index d397705..3152d1d 100644
--- a/src/main/java/ftbsc/lll/processor/annotations/Target.java
+++ b/src/main/java/ftbsc/lll/processor/annotations/Target.java
@@ -15,7 +15,7 @@ import java.lang.annotation.RetentionPolicy;
* @see Injector
*/
@Retention(RetentionPolicy.CLASS)
-@Repeatable(MultipleTargets.class)
+@Repeatable(Target.List.class)
@java.lang.annotation.Target(ElementType.METHOD)
public @interface Target {
@@ -52,4 +52,17 @@ public @interface Target {
* @since 0.5.2
*/
boolean bridge() default false;
+
+ /**
+ * Used to support {@link Target} as a {@link Repeatable} annotation.
+ * @since 0.6.1
+ */
+ @Retention(RetentionPolicy.CLASS)
+ @java.lang.annotation.Target(ElementType.METHOD)
+ @interface List {
+ /**
+ * @return the {@link Injector} annotations, as an array
+ */
+ Target[] value();
+ }
}