diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-02-12 12:15:25 +0100 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-02-12 12:15:25 +0100 |
commit | 86fed12ac48f750c16efd1311dfae980371725f9 (patch) | |
tree | 8478b0aff92fe48b1c6f6a5b84291286d3a521c0 /src/main/java/io/polyfrost/oneconfig | |
parent | 2231da6af9982840fa9d3bd24c4333bdbbe19cc2 (diff) | |
download | OneConfig-86fed12ac48f750c16efd1311dfae980371725f9.tar.gz OneConfig-86fed12ac48f750c16efd1311dfae980371725f9.tar.bz2 OneConfig-86fed12ac48f750c16efd1311dfae980371725f9.zip |
create annotations
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig')
7 files changed, 98 insertions, 0 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/Button.java b/src/main/java/io/polyfrost/oneconfig/annotations/Button.java new file mode 100644 index 0000000..98b735f --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/Button.java @@ -0,0 +1,14 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Button { + String name(); + String description() default ""; + String text() default "Button"; +} diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/Category.java b/src/main/java/io/polyfrost/oneconfig/annotations/Category.java new file mode 100644 index 0000000..05449dc --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/Category.java @@ -0,0 +1,12 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface Category { + String name(); +} diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/ColorPicker.java b/src/main/java/io/polyfrost/oneconfig/annotations/ColorPicker.java new file mode 100644 index 0000000..bf997a6 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/ColorPicker.java @@ -0,0 +1,14 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ColorPicker { + String name(); + String description() default ""; + boolean allowAlpha() default true; +} diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/Selector.java b/src/main/java/io/polyfrost/oneconfig/annotations/Selector.java new file mode 100644 index 0000000..39d238c --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/Selector.java @@ -0,0 +1,15 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Selector { + String name(); + String description() default ""; + String[] options(); + int defaultSelection() default 0; +} diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/Slider.java b/src/main/java/io/polyfrost/oneconfig/annotations/Slider.java new file mode 100644 index 0000000..990c70b --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/Slider.java @@ -0,0 +1,15 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Slider { + String name(); + String description() default ""; + int min(); + int max(); +} diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/Switch.java b/src/main/java/io/polyfrost/oneconfig/annotations/Switch.java new file mode 100644 index 0000000..fffb490 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/Switch.java @@ -0,0 +1,13 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Switch { + String name(); + String description() default ""; +} diff --git a/src/main/java/io/polyfrost/oneconfig/annotations/TextField.java b/src/main/java/io/polyfrost/oneconfig/annotations/TextField.java new file mode 100644 index 0000000..5761dd6 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/annotations/TextField.java @@ -0,0 +1,15 @@ +package io.polyfrost.oneconfig.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface TextField { + String name(); + String description() default ""; + String placeholder() default ""; + boolean hideText() default false; +} |