Skip to content

Commit 7f56433

Browse files
DavidArthurColelineargraph
authored andcommitted
Kotlin -> java for annotations
1 parent 9f33fe0 commit 7f56433

4 files changed

Lines changed: 34 additions & 25 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package io.github.notenoughupdates.moulconfig.annotations;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
@Retention(RetentionPolicy.RUNTIME)
9+
@Target(ElementType.FIELD)
10+
public @interface ConfigOrder {
11+
/**
12+
* The order of this option within its category.
13+
* Lower values appear first. Options without this annotation
14+
* default to 0, and appear in declaration order.
15+
*/
16+
int value() default 0;
17+
}

common/src/main/java/io/github/notenoughupdates/moulconfig/annotations/ConfigOrder.kt

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package io.github.notenoughupdates.moulconfig.annotations;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
@Retention(RetentionPolicy.RUNTIME)
9+
@Target(ElementType.FIELD)
10+
public @interface ConfigOverride {
11+
/**
12+
* Controls placement of this field relative to its siblings, inheriting the overridden parent
13+
* field's {@link ConfigOrder} value by default. Set explicitly to override that behavior.
14+
* Uses {@link Integer#MIN_VALUE} as a sentinel to indicate inheritance. Do not use that value directly.
15+
*/
16+
int overrideOrder() default Integer.MIN_VALUE;
17+
}

common/src/main/java/io/github/notenoughupdates/moulconfig/annotations/ConfigOverride.kt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)