From 0cb8a8da3e44637f56ffc5a9590b1013b443691f Mon Sep 17 00:00:00 2001 From: fred-boy Date: Mon, 23 Dec 2019 18:30:44 +0700 Subject: [PATCH] Add NonnullByDefault annotation --- .../cavedroid/game/mobs/package-info.java | 4 ++-- .../cavedroid/game/objects/package-info.java | 4 ++-- .../deadsoftware/cavedroid/game/package-info.java | 4 ++-- .../cavedroid/menu/objects/package-info.java | 4 ++-- .../deadsoftware/cavedroid/menu/package-info.java | 4 ++-- .../cavedroid/menu/submenus/package-info.java | 4 ++-- .../misc/annotations/NonnullByDefault.java | 14 ++++++++++++++ .../deadsoftware/cavedroid/misc/package-info.java | 4 ++-- .../cavedroid/misc/states/package-info.java | 4 ++-- .../ru/deadsoftware/cavedroid/package-info.java | 4 ++-- 10 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 core/src/ru/deadsoftware/cavedroid/misc/annotations/NonnullByDefault.java diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/package-info.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/package-info.java index ed9b92d..e76bf1b 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/mobs/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/game/mobs/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.game.mobs; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/game/objects/package-info.java b/core/src/ru/deadsoftware/cavedroid/game/objects/package-info.java index a12210b..c5856a0 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/objects/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/game/objects/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.game.objects; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/game/package-info.java b/core/src/ru/deadsoftware/cavedroid/game/package-info.java index d73a0b6..6290746 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/game/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.game; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/menu/objects/package-info.java b/core/src/ru/deadsoftware/cavedroid/menu/objects/package-info.java index f511278..b132187 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/objects/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/objects/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.menu.objects; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/menu/package-info.java b/core/src/ru/deadsoftware/cavedroid/menu/package-info.java index 92cd147..304c211 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.menu; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/menu/submenus/package-info.java b/core/src/ru/deadsoftware/cavedroid/menu/submenus/package-info.java index 6a5aa76..6c28493 100644 --- a/core/src/ru/deadsoftware/cavedroid/menu/submenus/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/menu/submenus/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.menu.submenus; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/misc/annotations/NonnullByDefault.java b/core/src/ru/deadsoftware/cavedroid/misc/annotations/NonnullByDefault.java new file mode 100644 index 0000000..bee4070 --- /dev/null +++ b/core/src/ru/deadsoftware/cavedroid/misc/annotations/NonnullByDefault.java @@ -0,0 +1,14 @@ +package ru.deadsoftware.cavedroid.misc.annotations; + +import javax.annotation.Nonnull; +import javax.annotation.meta.TypeQualifierDefault; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import static java.lang.annotation.ElementType.*; + +@Nonnull +@TypeQualifierDefault({METHOD, FIELD, PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +public @interface NonnullByDefault { +} diff --git a/core/src/ru/deadsoftware/cavedroid/misc/package-info.java b/core/src/ru/deadsoftware/cavedroid/misc/package-info.java index f2c7913..acdf3e1 100644 --- a/core/src/ru/deadsoftware/cavedroid/misc/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/misc/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.misc; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/misc/states/package-info.java b/core/src/ru/deadsoftware/cavedroid/misc/states/package-info.java index bc647bf..23fc406 100644 --- a/core/src/ru/deadsoftware/cavedroid/misc/states/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/misc/states/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid.misc.states; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file diff --git a/core/src/ru/deadsoftware/cavedroid/package-info.java b/core/src/ru/deadsoftware/cavedroid/package-info.java index 9bfa3e8..a566cb5 100644 --- a/core/src/ru/deadsoftware/cavedroid/package-info.java +++ b/core/src/ru/deadsoftware/cavedroid/package-info.java @@ -1,4 +1,4 @@ -@ParametersAreNonnullByDefault +@NonnullByDefault package ru.deadsoftware.cavedroid; -import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file +import ru.deadsoftware.cavedroid.misc.annotations.NonnullByDefault; \ No newline at end of file -- 2.29.2