From 26664e149aa34091a3d162c0fe22dab0cfcd8e8c Mon Sep 17 00:00:00 2001
From: codestech <56263050+Codestech1@users.noreply.github.com>
Date: Tue, 11 Aug 2026 09:59:18 +0200
Subject: [PATCH 1/3] feat(modules): add loggers to modules
---
src/main/java/net/hypejet/modules/Module.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/main/java/net/hypejet/modules/Module.java b/src/main/java/net/hypejet/modules/Module.java
index c4a1c61..8a73173 100644
--- a/src/main/java/net/hypejet/modules/Module.java
+++ b/src/main/java/net/hypejet/modules/Module.java
@@ -19,6 +19,8 @@
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A module to be loaded with {@link ModuleManager}.
@@ -32,6 +34,7 @@
public abstract class Module {
private @Nullable ModuleManager extends E> moduleManager;
+ private @Nullable Logger logger;
/**
* Gets whether this module is currently loaded.
@@ -72,6 +75,18 @@ public final E getEnvironment() {
return this.getModuleManager().getEnvironment();
}
+ /**
+ * Gets the logger of this module.
+ *
+ * @return the logger
+ * @since 1.0.3
+ */
+ public final Logger getLogger() {
+ if (this.logger == null)
+ this.logger = LoggerFactory.getLogger(this.getClass());
+ return this.logger;
+ }
+
/**
* Called when this module becomes loaded.
*
From 03c299f8eb69817e87a77ebbac8feb3f970703f9 Mon Sep 17 00:00:00 2001
From: codestech <56263050+Codestech1@users.noreply.github.com>
Date: Tue, 11 Aug 2026 10:05:49 +0200
Subject: [PATCH 2/3] fix(*): replace versions in `@since` tags with actual
releases of Modules
---
src/main/java/net/hypejet/modules/Module.java | 12 ++++++------
.../java/net/hypejet/modules/ModuleManager.java | 16 ++++++++--------
.../java/net/hypejet/modules/ModuleRegistry.java | 6 +++---
.../modules/annotation/AbstractModule.java | 2 +-
.../modules/annotation/ModuleDependencies.java | 8 ++++----
.../CircularModuleDependenciesException.java | 4 ++--
.../net/hypejet/modules/AbstractModulesTest.java | 2 +-
.../modules/ModuleCircularLoadingTest.java | 2 +-
.../hypejet/modules/ModuleDependenciesTest.java | 2 +-
.../net/hypejet/modules/ModuleLoadingTest.java | 2 +-
.../net/hypejet/modules/ModuleUtilsTest.java | 2 +-
11 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/src/main/java/net/hypejet/modules/Module.java b/src/main/java/net/hypejet/modules/Module.java
index 8a73173..1093197 100644
--- a/src/main/java/net/hypejet/modules/Module.java
+++ b/src/main/java/net/hypejet/modules/Module.java
@@ -26,7 +26,7 @@
* A module to be loaded with {@link ModuleManager}.
*
* @param the type of environment that this module runs on
- * @since 1.0
+ * @since 1.0.0
* @see ModuleManager
*/
@NullMarked
@@ -40,7 +40,7 @@ public abstract class Module {
* Gets whether this module is currently loaded.
*
* @return {@code true} if the module is loaded, {@code false} otherwise
- * @since 1.0
+ * @since 1.0.0
*/
public final boolean isLoaded() {
return this.moduleManager != null;
@@ -53,7 +53,7 @@ public final boolean isLoaded() {
*
* @return the module manager
* @throws IllegalStateException if this module is not loaded
- * @since 1.0
+ * @since 1.0.0
*/
public final ModuleManager extends E> getModuleManager() {
if (!this.isLoaded())
@@ -68,7 +68,7 @@ public final ModuleManager extends E> getModuleManager() {
*
* @return the environment
* @throws IllegalStateException if this module is not loaded
- * @since 1.0
+ * @since 1.0.0
* @see #getModuleManager()
*/
public final E getEnvironment() {
@@ -90,7 +90,7 @@ public final Logger getLogger() {
/**
* Called when this module becomes loaded.
*
- * @since 1.0
+ * @since 1.0.0
*/
@ApiStatus.OverrideOnly
protected void load() {}
@@ -98,7 +98,7 @@ protected void load() {}
/**
* Called when this module becomes unloaded.
*
- * @since 1.0
+ * @since 1.0.0
*/
@ApiStatus.OverrideOnly
protected void unload() {}
diff --git a/src/main/java/net/hypejet/modules/ModuleManager.java b/src/main/java/net/hypejet/modules/ModuleManager.java
index 4054ce1..8b0b411 100644
--- a/src/main/java/net/hypejet/modules/ModuleManager.java
+++ b/src/main/java/net/hypejet/modules/ModuleManager.java
@@ -32,7 +32,7 @@
* A manager of modules.
*
* @param the type of environment that this module manager runs on
- * @since 1.0
+ * @since 1.0.0
* @see Module
*/
@NullMarked
@@ -58,7 +58,7 @@ public final class ModuleManager {
*
* @return the environment
* @throws IllegalStateException if this module manager is not loaded
- * @since 1.0
+ * @since 1.0.0
*/
public E getEnvironment() {
this.ensureLoaded();
@@ -76,7 +76,7 @@ public E getEnvironment() {
* @return the module instance, {@code null} if the module was not loaded
* @param the type of module instance to return
* @throws IllegalStateException if this module manager is not loaded
- * @since 1.0
+ * @since 1.0.0
* @see AbstractModule
*/
public > @Nullable M getModule(Class clazz) {
@@ -91,7 +91,7 @@ public E getEnvironment() {
* @return the module instance
* @param the type of module instance to return
* @throws IllegalStateException if either this module manager or the specified module is not loaded
- * @since 1.0
+ * @since 1.0.2
* @see #getModule(Class)
*/
public > M getModuleOrThrow(Class clazz) {
@@ -105,7 +105,7 @@ public > M getModuleOrThrow(Class clazz) {
*
* @return the modules that are currently loaded
* @throws IllegalStateException if this module manager is not loaded
- * @since 1.0
+ * @since 1.0.0
*/
public Collection extends Module super E>> getModules() {
this.ensureLoaded();
@@ -122,7 +122,7 @@ public Collection extends Module super E>> getModules() {
* @param clazz the class of the module to check
* @return {@code true} if the module was loaded, {@code false} otherwise
* @throws IllegalStateException if this module manager is not loaded
- * @since 1.0
+ * @since 1.0.0
* @see AbstractModule
*/
public boolean isModuleLoaded(Class extends Module>> clazz) {
@@ -133,7 +133,7 @@ public boolean isModuleLoaded(Class extends Module>> clazz) {
* Loads all modules created by this module manager.
*
* @throws IllegalStateException if this module manager is unloaded
- * @since 1.0
+ * @since 1.0.0
*/
public void load() {
if (this.state == State.UNLOADED)
@@ -158,7 +158,7 @@ public void load() {
* Unloads all modules loaded by this module manager.
*
* @throws IllegalStateException if this module manager is not loaded
- * @since 1.0
+ * @since 1.0.0
*/
public void unload() {
this.ensureLoaded();
diff --git a/src/main/java/net/hypejet/modules/ModuleRegistry.java b/src/main/java/net/hypejet/modules/ModuleRegistry.java
index 0c2d62b..de717e0 100644
--- a/src/main/java/net/hypejet/modules/ModuleRegistry.java
+++ b/src/main/java/net/hypejet/modules/ModuleRegistry.java
@@ -33,7 +33,7 @@
* A registry of modules to be created and loaded by a {@link ModuleManager}.
*
* @param the type of environment that the module manager is going to run on
- * @since 1.0
+ * @since 1.0.0
* @see ModuleManager
*/
@NullMarked
@@ -54,7 +54,7 @@ public final class ModuleRegistry {
* @param supplier the supplier of the module instance
* @return this module registry
* @param the type of module that is being registered
- * @since 1.0
+ * @since 1.0.0
*/
public > ModuleRegistry register(Class clazz, Supplier supplier) {
if (this.moduleEntries.containsKey(clazz) || this.superclassModules.containsKey(clazz)) {
@@ -115,7 +115,7 @@ public > ModuleRegistry register(Class clazz,
* @return the created module manager
* @throws CircularModuleDependenciesException if the module manager could not be created
* because circular module dependencies were detected
- * @since 1.0
+ * @since 1.0.0
*/
public ModuleManager createModuleManager(E environment) {
ModuleLoadOrder loadOrder = new ModuleLoadOrder<>(this.moduleEntries, this.superclassModules);
diff --git a/src/main/java/net/hypejet/modules/annotation/AbstractModule.java b/src/main/java/net/hypejet/modules/annotation/AbstractModule.java
index f172a12..85f3457 100644
--- a/src/main/java/net/hypejet/modules/annotation/AbstractModule.java
+++ b/src/main/java/net/hypejet/modules/annotation/AbstractModule.java
@@ -32,7 +32,7 @@
* {@link ModuleManager#getModule(Class)}, as well as {@link ModuleManager#isModuleLoaded(Class)}, though the list
* may be incomplete.
*
- * @since 1.0
+ * @since 1.0.0
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface AbstractModule {}
\ No newline at end of file
diff --git a/src/main/java/net/hypejet/modules/annotation/ModuleDependencies.java b/src/main/java/net/hypejet/modules/annotation/ModuleDependencies.java
index a783b99..8e5f791 100644
--- a/src/main/java/net/hypejet/modules/annotation/ModuleDependencies.java
+++ b/src/main/java/net/hypejet/modules/annotation/ModuleDependencies.java
@@ -37,7 +37,7 @@
* required or not can be overridden by subclasses through specifying them again using this annotation.
* It is even possible to remove a dependency by subclasses, see {@link #removed()} for more information.
*
- * @since 1.0
+ * @since 1.0.0
* @see AbstractModule
*/
@NullMarked
@@ -47,7 +47,7 @@
* The modules that are required by the module annotated with this annotation.
*
* @return the classes of required modules
- * @since 1.0
+ * @since 1.0.0
*/
Class extends Module>[] required() default {};
@@ -56,7 +56,7 @@
* with this annotation if they are present, but are not strictly required.
*
* @return the classes of optional modules
- * @since 1.0
+ * @since 1.0.0
*/
Class extends Module>[] optional() default {};
@@ -67,7 +67,7 @@
* a dependency, while the annotating class does not.
*
* @return the classes of modules that are not dependencies
- * @since 1.0
+ * @since 1.0.0
*/
Class extends Module>[] removed() default {};
}
\ No newline at end of file
diff --git a/src/main/java/net/hypejet/modules/exception/CircularModuleDependenciesException.java b/src/main/java/net/hypejet/modules/exception/CircularModuleDependenciesException.java
index c4e5f6d..def0189 100644
--- a/src/main/java/net/hypejet/modules/exception/CircularModuleDependenciesException.java
+++ b/src/main/java/net/hypejet/modules/exception/CircularModuleDependenciesException.java
@@ -20,7 +20,7 @@
/**
* An exception thrown when the module system detects circular module dependencies.
*
- * @since 1.0
+ * @since 1.0.0
* @see RuntimeException
*/
public final class CircularModuleDependenciesException extends RuntimeException {
@@ -29,7 +29,7 @@ public final class CircularModuleDependenciesException extends RuntimeException
*
* For internal use only.
*
- * @since 1.0
+ * @since 1.0.0
*/
@ApiStatus.Internal
public CircularModuleDependenciesException() {
diff --git a/src/test/java/net/hypejet/modules/AbstractModulesTest.java b/src/test/java/net/hypejet/modules/AbstractModulesTest.java
index 2629acb..eebd48a 100644
--- a/src/test/java/net/hypejet/modules/AbstractModulesTest.java
+++ b/src/test/java/net/hypejet/modules/AbstractModulesTest.java
@@ -23,7 +23,7 @@
/**
* A test of getting abstract modules, their superclass modules, and modules extending them.
*
- * @since 1.0
+ * @since 1.0.0
* @see AbstractModule
*/
@NullMarked
diff --git a/src/test/java/net/hypejet/modules/ModuleCircularLoadingTest.java b/src/test/java/net/hypejet/modules/ModuleCircularLoadingTest.java
index 654196a..9fc6cb7 100644
--- a/src/test/java/net/hypejet/modules/ModuleCircularLoadingTest.java
+++ b/src/test/java/net/hypejet/modules/ModuleCircularLoadingTest.java
@@ -26,7 +26,7 @@
/**
* A test of creating module managers containing circular module dependencies.
*
- * @since 1.0
+ * @since 1.0.0
* @see ModuleManager
*/
@NullMarked
diff --git a/src/test/java/net/hypejet/modules/ModuleDependenciesTest.java b/src/test/java/net/hypejet/modules/ModuleDependenciesTest.java
index 2e16292..e01785c 100644
--- a/src/test/java/net/hypejet/modules/ModuleDependenciesTest.java
+++ b/src/test/java/net/hypejet/modules/ModuleDependenciesTest.java
@@ -27,7 +27,7 @@
/**
* A test of loading modules that depend on other modules and order of such loading.
*
- * @since 1.0
+ * @since 1.0.0
* @see Module
*/
@NullMarked
diff --git a/src/test/java/net/hypejet/modules/ModuleLoadingTest.java b/src/test/java/net/hypejet/modules/ModuleLoadingTest.java
index 77519da..af3cc2b 100644
--- a/src/test/java/net/hypejet/modules/ModuleLoadingTest.java
+++ b/src/test/java/net/hypejet/modules/ModuleLoadingTest.java
@@ -26,7 +26,7 @@
/**
* A test of module manager state after loading modules.
*
- * @since 1.0
+ * @since 1.0.0
* @see Module
* @see ModuleManager
*/
diff --git a/src/test/java/net/hypejet/modules/ModuleUtilsTest.java b/src/test/java/net/hypejet/modules/ModuleUtilsTest.java
index 52039f7..5852609 100644
--- a/src/test/java/net/hypejet/modules/ModuleUtilsTest.java
+++ b/src/test/java/net/hypejet/modules/ModuleUtilsTest.java
@@ -27,7 +27,7 @@
/**
* A test of internal utilities used by the library.
*
- * @since 1.0
+ * @since 1.0.0
*/
@NullMarked
public final class ModuleUtilsTest {
From 8360c619d77a7f536024cd63a60e13c9d9163be5 Mon Sep 17 00:00:00 2001
From: codestech <56263050+Codestech1@users.noreply.github.com>
Date: Tue, 11 Aug 2026 10:07:36 +0200
Subject: [PATCH 3/3] chore(gradle): increment the project version to
`1.0.3-SNAPSHOT`
---
build.gradle.kts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index 5c0dfe2..fe7edd5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,7 +9,7 @@ plugins {
val javaVersion = 25
group = "net.hypejet"
-version = releaseTag() ?: "1.0.2-SNAPSHOT"
+version = releaseTag() ?: "1.0.3-SNAPSHOT"
description = "A Java library making modular programming easier"
repositories {