aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/config/annotations
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config/annotations')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java b/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java
new file mode 100644
index 0000000..6ffd1d9
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/config/annotations/Exclude.java
@@ -0,0 +1,24 @@
+package cc.polyfrost.oneconfig.config.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Excludes fields from being serialized or deserialized by OneConfig's Config and HUD
+ * system.
+ *
+ * This can be used interchangeably with the transient modifier built into Java.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface Exclude {
+ ExcludeType type() default ExcludeType.ALL;
+
+ enum ExcludeType {
+ ALL,
+ CONFIG,
+ HUD
+ }
+}