Skip to content

Commit f808957

Browse files
committed
chore: move @SInCE javadoc into ApiStatus.AvailableSince annotations
1 parent 116f12e commit f808957

37 files changed

Lines changed: 140 additions & 218 deletions

src/main/java/com/falsepattern/lib/DeprecationDetails.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
package com.falsepattern.lib;
2424

25+
import org.jetbrains.annotations.ApiStatus;
26+
2527
import java.lang.annotation.Documented;
2628
import java.lang.annotation.Retention;
2729
import java.lang.annotation.RetentionPolicy;
@@ -31,28 +33,26 @@
3133
* <p>
3234
* Used together with {@link Deprecated} to specify when an API was marked stable, and when it was marked for deprecation.
3335
* Deprecated classes MAY be removed after a full deprecation cycle as described inside the {@link StableAPI} javadoc.
34-
* @since 0.10.0
3536
* @deprecated since 1.7.0
3637
*/
38+
@ApiStatus.AvailableSince("0.10.0")
3739
@Deprecated
3840
@Documented
3941
@Retention(RetentionPolicy.RUNTIME)
4042
public @interface DeprecationDetails {
4143
String deprecatedSince();
4244

43-
/**
44-
* @since 0.11.0
45-
*/
45+
@ApiStatus.AvailableSince("0.11.0")
4646
String replacement() default "";
4747

4848
/**
4949
* DEPRECATED: Use the jetbrains annotations/jspecify instead!
5050
* <p>
5151
* This marks an API for removal in a future version.
5252
*
53-
* @since 0.12.0
5453
* @deprecated since 1.7.0
5554
*/
55+
@ApiStatus.AvailableSince("0.12.0")
5656
@Deprecated
5757
@Documented
5858
@Retention(RetentionPolicy.RUNTIME)

src/main/java/com/falsepattern/lib/StableAPI.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*/
2222
package com.falsepattern.lib;
2323

24+
import org.jetbrains.annotations.ApiStatus;
25+
2426
import java.lang.annotation.Documented;
2527
import java.lang.annotation.ElementType;
2628
import java.lang.annotation.Retention;
@@ -55,8 +57,8 @@
5557
* error, unlike __INTERNAL__, but if any issues arise from the usage of the API or the API changing, the API developer
5658
* shall not be blamed for it.
5759
* @deprecated since 1.7.0
58-
* @since 0.6.0
5960
*/
61+
@ApiStatus.AvailableSince("0.6.0")
6062
@Deprecated
6163
@Documented
6264
@Retention(RetentionPolicy.RUNTIME)
@@ -80,8 +82,8 @@
8082
* inner classes still need to use {@link StableAPI}.
8183
*
8284
* @deprecated since 1.7.0
83-
* @since 0.10.0
8485
*/
86+
@ApiStatus.AvailableSince("0.10.0")
8587
@Deprecated
8688
@Documented
8789
@Retention(RetentionPolicy.RUNTIME)
@@ -99,8 +101,8 @@
99101
* changed or removed in any version in the library without prior notice.
100102
*
101103
* @deprecated since 1.7.0
102-
* @since 0.10.0
103104
*/
105+
@ApiStatus.AvailableSince("0.10.0")
104106
@Deprecated
105107
@Documented
106108
@Retention(RetentionPolicy.RUNTIME)

src/main/java/com/falsepattern/lib/asm/exceptions/package-info.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
2121
*/
2222

23-
/**
24-
* @since 0.10.0
25-
*/
26-
package com.falsepattern.lib.asm.exceptions;
23+
@ApiStatus.AvailableSince("0.10.0")
24+
package com.falsepattern.lib.asm.exceptions;
25+
26+
import org.jetbrains.annotations.ApiStatus;

src/main/java/com/falsepattern/lib/asm/package-info.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
2121
*/
2222

23-
/**
24-
* @since 0.10.0
25-
*/
26-
package com.falsepattern.lib.asm;
23+
@ApiStatus.AvailableSince("0.10.0")
24+
package com.falsepattern.lib.asm;
25+
26+
import org.jetbrains.annotations.ApiStatus;

src/main/java/com/falsepattern/lib/compat/BlockPos.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import lombok.val;
3030
import org.apache.logging.log4j.LogManager;
3131
import org.apache.logging.log4j.Logger;
32+
import org.jetbrains.annotations.ApiStatus;
3233

3334
import net.minecraft.entity.Entity;
3435
import net.minecraft.util.EnumFacing;
@@ -364,9 +365,7 @@ public BlockPos toImmutable() {
364365
return this;
365366
}
366367

367-
/**
368-
* @since 0.10.0
369-
*/
368+
@ApiStatus.AvailableSince("0.10.0")
370369
@Setter
371370
@Getter
372371
public static class MutableBlockPos extends BlockPos {
@@ -453,9 +452,7 @@ public BlockPos.MutableBlockPos move(@NonNull EnumFacing facing, int blocks) {
453452
}
454453
}
455454

456-
/**
457-
* @since 0.10.0
458-
*/
455+
@ApiStatus.AvailableSince("0.10.0")
459456
public static final class PooledMutableBlockPos extends BlockPos.MutableBlockPos {
460457
private static final List<BlockPos.PooledMutableBlockPos> POOL = new ArrayList<>();
461458
private boolean released;

src/main/java/com/falsepattern/lib/compat/GuiLabel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import lombok.NonNull;
2525
import lombok.val;
26+
import org.jetbrains.annotations.ApiStatus;
2627
import org.lwjgl.opengl.GL11;
2728

2829
import net.minecraft.client.Minecraft;
@@ -38,9 +39,8 @@
3839

3940
/**
4041
* A functional equivalent to GuiLabel present in Minecraft 1.12.
41-
*
42-
* @since 0.8.0
4342
*/
43+
@ApiStatus.AvailableSince("0.8.0")
4444
@SideOnly(Side.CLIENT)
4545
public class GuiLabel extends Gui {
4646
private final List<String> lines = new ArrayList<>();

src/main/java/com/falsepattern/lib/compat/package-info.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* along with FalsePatternLib. If not, see <https://www.gnu.org/licenses/>.
2121
*/
2222

23-
/**
24-
* @since 0.6.0
25-
*/
26-
package com.falsepattern.lib.compat;
23+
@ApiStatus.AvailableSince("0.6.0")
24+
package com.falsepattern.lib.compat;
25+
26+
import org.jetbrains.annotations.ApiStatus;

src/main/java/com/falsepattern/lib/config/Config.java

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
package com.falsepattern.lib.config;
2323

2424
import org.intellij.lang.annotations.Language;
25+
import org.jetbrains.annotations.ApiStatus;
2526

2627
import java.lang.annotation.Documented;
2728
import java.lang.annotation.ElementType;
@@ -94,9 +95,8 @@
9495
* Define category migrations here.
9596
* Used to rename config categories without losing data.
9697
* @see #pathMigrations()
97-
*
98-
* @since 1.5.0
9998
*/
99+
@ApiStatus.AvailableSince("1.5.0")
100100
String[] categoryMigrations() default {};
101101

102102
/**
@@ -110,9 +110,8 @@
110110
* customPath = "mymod.config" -> .minecraft/config/mymod.config
111111
* <br>
112112
* @see #modid()
113-
*
114-
* @since 1.5.0
115113
*/
114+
@ApiStatus.AvailableSince("1.5.0")
116115
String customPath() default "";
117116

118117
/**
@@ -126,9 +125,8 @@
126125
* the category of this config.
127126
* @see #customPath()
128127
* @see #categoryMigrations()
129-
*
130-
* @since 1.5.0
131128
*/
129+
@ApiStatus.AvailableSince("1.5.0")
132130
String[] pathMigrations() default {};
133131

134132
// region Common
@@ -182,9 +180,8 @@
182180

183181
/**
184182
* Use this to migrate from old config names. "" is resolved to the name of the field
185-
*
186-
* @since 1.5.0
187183
*/
184+
@ApiStatus.AvailableSince("1.5.0")
188185
String[] migrations() default {};
189186
}
190187

@@ -214,19 +211,17 @@
214211
* <p>
215212
* Note that synchronization ALWAYS happens FROM the server TO the client. The server should NEVER attempt to get
216213
* configuration values from a client. This is to avoid malicious clients manipulating the server configs.
217-
*
218-
* @since 0.10.0
219214
*/
215+
@ApiStatus.AvailableSince("0.10.0")
220216
@Documented
221217
@Retention(RetentionPolicy.RUNTIME)
222218
@Target(ElementType.TYPE)
223219
@interface Synchronize {}
224220

225221
/**
226222
* Use this to mark config fields you don't want to synchronize in a class marked with {@link Synchronize}.
227-
*
228-
* @since 0.10.0
229223
*/
224+
@ApiStatus.AvailableSince("0.10.0")
230225
@Documented
231226
@Retention(RetentionPolicy.RUNTIME)
232227
@Target(ElementType.FIELD)
@@ -281,9 +276,8 @@
281276
/**
282277
* The default value for a double field.
283278
* @see RangeDouble
284-
*
285-
* @since 0.10.0
286279
*/
280+
@ApiStatus.AvailableSince("0.10.0")
287281
@Documented
288282
@Retention(RetentionPolicy.RUNTIME)
289283
@Target(ElementType.FIELD)
@@ -293,9 +287,8 @@
293287

294288
/**
295289
* The range of possible values a double config can have.
296-
*
297-
* @since 0.10.0
298290
*/
291+
@ApiStatus.AvailableSince("0.10.0")
299292
@Documented
300293
@Retention(RetentionPolicy.RUNTIME)
301294
@Target(ElementType.FIELD)
@@ -325,9 +318,8 @@
325318
* This annotation limits the maximum number of characters present in a string configuration.
326319
* <p>
327320
* When used with a string list, this limit will apply to each element individually, not to the size of the list as a whole.
328-
*
329-
* @since 0.10.0
330321
*/
322+
@ApiStatus.AvailableSince("0.10.0")
331323
@Documented
332324
@Retention(RetentionPolicy.RUNTIME)
333325
@Target(ElementType.FIELD)
@@ -368,9 +360,8 @@
368360
* The default value for a boolean array field.
369361
* @see ListFixedLength
370362
* @see ListMaxLength
371-
*
372-
* @since 0.10.0
373363
*/
364+
@ApiStatus.AvailableSince("0.10.0")
374365
@Documented
375366
@Retention(RetentionPolicy.RUNTIME)
376367
@Target(ElementType.FIELD)
@@ -383,9 +374,8 @@
383374
* @see ListFixedLength
384375
* @see ListMaxLength
385376
* @see RangeInt
386-
*
387-
* @since 0.10.0
388377
*/
378+
@ApiStatus.AvailableSince("0.10.0")
389379
@Documented
390380
@Retention(RetentionPolicy.RUNTIME)
391381
@Target(ElementType.FIELD)
@@ -398,9 +388,8 @@
398388
* @see ListFixedLength
399389
* @see ListMaxLength
400390
* @see RangeDouble
401-
*
402-
* @since 0.10.0
403391
*/
392+
@ApiStatus.AvailableSince("0.10.0")
404393
@Documented
405394
@Retention(RetentionPolicy.RUNTIME)
406395
@Target(ElementType.FIELD)
@@ -426,9 +415,8 @@
426415
* If this annotation is present, the list in the config will be forced to have exactly the amount of elements as
427416
* the default value.
428417
* @see ListMaxLength
429-
*
430-
* @since 0.10.0
431418
*/
419+
@ApiStatus.AvailableSince("0.10.0")
432420
@Documented
433421
@Retention(RetentionPolicy.RUNTIME)
434422
@Target(ElementType.FIELD)
@@ -437,9 +425,8 @@
437425
/**
438426
* This annotation limits the maximum number of elements present in an array configuration. Only effective if
439427
* {@link ListFixedLength} is NOT present.
440-
*
441-
* @since 0.10.0
442428
*/
429+
@ApiStatus.AvailableSince("0.10.0")
443430
@Documented
444431
@Retention(RetentionPolicy.RUNTIME)
445432
@Target(ElementType.FIELD)

0 commit comments

Comments
 (0)