From 9bc1882de32addd22a3a73a31402090072b65384 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 16 Jun 2024 21:06:32 +0200 Subject: [PATCH] Add missing javadoc --- .../java/de/staropensource/sosengine/base/Engine.java | 6 ++++++ .../sosengine/base/EngineConfiguration.java | 11 +++++++++-- .../sosengine/base/classes/helpers/EventHelper.java | 3 ++- .../staropensource/sosengine/base/logging/Logger.java | 2 +- .../sosengine/base/utility/ListFormatter.java | 5 +++++ .../sosengine/base/utility/Miscellaneous.java | 3 ++- .../sosengine/graphics/opengl/OpenGlManagement.java | 5 +++++ .../sosengine/graphics/classes/ApiMainClass.java | 1 + .../graphics/classes/ApiManagementClass.java | 3 +++ .../sosengine/graphics/vulkan/VulkanManagement.java | 5 +++++ .../sosengine/graphics/vulkan/VulkanSubsystem.java | 2 +- .../slf4j_compat/CompatibilityLoggerFactory.java | 3 +++ .../slf4j_compat/CompatibilityLoggerProvider.java | 5 +++++ 13 files changed, 48 insertions(+), 6 deletions(-) diff --git a/base/src/main/java/de/staropensource/sosengine/base/Engine.java b/base/src/main/java/de/staropensource/sosengine/base/Engine.java index a14fdb6..5bc8891 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/Engine.java +++ b/base/src/main/java/de/staropensource/sosengine/base/Engine.java @@ -76,6 +76,12 @@ public final class Engine implements SubsystemMainClass { * Indicates if the engine is shutting down. * * @since 1-alpha1 + * + * -- GETTER -- + * Returns if the engine is shutting down. + * + * @return if the engine is shutting down + * @since 1-alpha1 */ @Getter private boolean shuttingDown = false; diff --git a/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java b/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java index 6a854bf..51bf17d 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java +++ b/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java @@ -88,6 +88,13 @@ public final class EngineConfiguration implements SubsystemConfiguration { * * @see de.staropensource.sosengine.base.classes.helpers.EventHelper#logCall(Class, Object...) * @since 1-alpha0 + * + * -- GETTER -- + * Gets the value for {@code debugEvents}. + * + * @return variable value + * @see EngineConfiguration#debugEvents + * @since 1-alpha0 */ private boolean debugEvents; @@ -190,14 +197,14 @@ public final class EngineConfiguration implements SubsystemConfiguration { * Only applies if {@code optimizeLogging} is turned on. * * @see EngineConfiguration#optimizeLogging - * @since 1-alpha0 + * @since 1-alpha1 * * -- GETTER -- * Gets the value for {@code loggerForceStandardOutput}. * * @return variable value * @see EngineConfiguration#loggerForceStandardOutput - * @since 1-alpha0 + * @since 1-alpha1 */ private int loggerPollingSpeed; diff --git a/base/src/main/java/de/staropensource/sosengine/base/classes/helpers/EventHelper.java b/base/src/main/java/de/staropensource/sosengine/base/classes/helpers/EventHelper.java index 437deac..42c133c 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/classes/helpers/EventHelper.java +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/helpers/EventHelper.java @@ -60,7 +60,8 @@ public class EventHelper { /** * Logs the event call. * - * @param clazz event class + * @param clazz event class + * @param arguments arguments passed to event listeners * @since 1-alpha0 */ public static void logCall(@NotNull Class clazz, @NotNull Object ... arguments) { diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java b/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java index 1a18e92..427a804 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java @@ -105,7 +105,7 @@ public final class Logger { * Starts the logging thread. * * @since 1-alpha1 - * @see Logger#getLoggingThread() + * @see Logger#loggingThread */ public static void startLoggingThread() { if (loggingThread == null) { diff --git a/base/src/main/java/de/staropensource/sosengine/base/utility/ListFormatter.java b/base/src/main/java/de/staropensource/sosengine/base/utility/ListFormatter.java index 29aa883..5c77fe0 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/utility/ListFormatter.java +++ b/base/src/main/java/de/staropensource/sosengine/base/utility/ListFormatter.java @@ -33,6 +33,11 @@ import java.util.Set; */ @SuppressWarnings({ "unused" }) public class ListFormatter { + /** + * Constructor. + */ + public ListFormatter() {} + /** * Converts an array to a {@link String}. * diff --git a/base/src/main/java/de/staropensource/sosengine/base/utility/Miscellaneous.java b/base/src/main/java/de/staropensource/sosengine/base/utility/Miscellaneous.java index 529b377..a9b1173 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/utility/Miscellaneous.java +++ b/base/src/main/java/de/staropensource/sosengine/base/utility/Miscellaneous.java @@ -57,7 +57,7 @@ public final class Miscellaneous { /** * Forcefully invokes the garbage collector and blocks execution until finished.
- * If you want to run it in parallel to your program, consider running it in a {@link VirtualThread}. + * If you want to run it in parallel to your program, consider running it in a {@link java.lang.VirtualThread}. * * @since 1-alpha0 */ @@ -88,6 +88,7 @@ public final class Miscellaneous { * * @param map map to use * @param value value to search for + * @return all keys matching the specified value * @since 1-alpha0 */ public static Set getMapValue(@NotNull Map map, @Nullable Object value) { diff --git a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java index 3ec7813..1568a89 100644 --- a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java +++ b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java @@ -31,6 +31,11 @@ import org.jetbrains.annotations.NotNull; */ @SuppressWarnings({ "unused" }) public final class OpenGlManagement implements ApiManagementClass { + /** + * Constructor. + */ + public OpenGlManagement() {} + /** {@inheritDoc} */ @NotNull @Override diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiMainClass.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiMainClass.java index a864e0a..9e427e5 100644 --- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiMainClass.java +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiMainClass.java @@ -44,6 +44,7 @@ public interface ApiMainClass extends SubsystemMainClass { /** * Returns the name of the Graphics API. * + * @return Graphics API name * @since 1-alpha0 */ String getApiName(); diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java index 49cf717..f9898fd 100644 --- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java @@ -32,6 +32,9 @@ public interface ApiManagementClass { /** * Creates a new {@link Window}. * + * @param title initial window title + * @param size initial window size + * @return new window * @since 1-alpha0 */ @NotNull diff --git a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanManagement.java b/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanManagement.java index ddd4241..d0cf618 100644 --- a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanManagement.java +++ b/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanManagement.java @@ -25,6 +25,11 @@ import de.staropensource.sosengine.graphics.classes.Window; import org.jetbrains.annotations.NotNull; public class VulkanManagement implements ApiManagementClass { + /** + * Constructor. + */ + public VulkanManagement() {} + /** {@inheritDoc} */ @NotNull @Override diff --git a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java b/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java index 5e74be5..2efef53 100644 --- a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java +++ b/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java @@ -89,7 +89,7 @@ public final class VulkanSubsystem implements ApiMainClass { } // Warn about instability - logger.warn("The Vulkan Graphics API is unfinished. Trying to initialize it will lead to an engine crash."); + logger.warn("The Vulkan Graphics API is in an unfinished state. Trying to initialize the Graphics API will cause an engine crash."); // Register Graphics API GraphicsSubsystem.getInstance().registerGraphicsApi(this); diff --git a/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerFactory.java b/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerFactory.java index 5a9ade6..6ea26e7 100644 --- a/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerFactory.java +++ b/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerFactory.java @@ -33,6 +33,9 @@ import java.util.concurrent.ConcurrentMap; public class CompatibilityLoggerFactory implements ILoggerFactory { ConcurrentMap<@NotNull String, @NotNull Logger> loggerMap; + /** + * Constructor. + */ public CompatibilityLoggerFactory() { loggerMap = new ConcurrentHashMap<>(); CompatibilityLogger.lazyInit(); diff --git a/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerProvider.java b/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerProvider.java index 43cc59b..119dd77 100644 --- a/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerProvider.java +++ b/slf4j-compat/src/main/java/de/staropensource/sosengine/slf4j_compat/CompatibilityLoggerProvider.java @@ -73,6 +73,11 @@ public class CompatibilityLoggerProvider implements SLF4JServiceProvider { */ private MDCAdapter mDCAdapter; + /** + * Constructor. + */ + public CompatibilityLoggerProvider() {} + /** {@inheritDoc} */ @Override public void initialize() {