From 0966a43d5ed2d7cec276b11fd8218cc4f9722a04 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 3 Nov 2024 18:54:27 +0100 Subject: [PATCH] Fix Javadoc generation issues --- .../engine/base/utility/FileAccess.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java b/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java index f19ceeae..73c65ac1 100644 --- a/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java +++ b/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java @@ -23,6 +23,7 @@ import de.staropensource.engine.base.Engine; import de.staropensource.engine.base.logging.LoggerInstance; import de.staropensource.engine.base.type.EngineState; import de.staropensource.engine.base.type.FileType; +import lombok.AccessLevel; import lombok.Getter; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; @@ -90,6 +91,7 @@ public final class FileAccess { * @see LoggerInstance * @since v1-alpha8 */ + @Getter(value = AccessLevel.NONE) private final @NotNull LoggerInstance logger; /** @@ -126,18 +128,20 @@ public final class FileAccess { /** * Creates and initializes an instance of this class. * + * @param path path you wish to access * @throws InvalidPathException if a {@link Path} cannot be created (see {@link FileSystem#getPath(String, String...)}) * @since v1-alpha8 */ - public FileAccess(@NotNull String pathString) throws InvalidPathException { - this.path = formatPath(pathString).toAbsolutePath(); - this.file = new File(pathString); - logger = new LoggerInstance.Builder().setClazz(getClass()).setOrigin("ENGINE").setMetadata(path.toString()).build(); + public FileAccess(@NotNull String path) throws InvalidPathException { + this.path = formatPath(path).toAbsolutePath(); + this.file = new File(path); + logger = new LoggerInstance.Builder().setClazz(getClass()).setOrigin("ENGINE").setMetadata(this.path.toString()).build(); } /** * Creates and initializes an instance of this class. * + * @param path path you wish to access * @since v1-alpha8 */ public FileAccess(@NotNull Path path) { @@ -149,6 +153,7 @@ public final class FileAccess { /** * Creates and initializes an instance of this class. * + * @param file {@link File} to the path you wish to access * @throws InvalidPathException if a {@link Path} cannot be created (see {@link FileSystem#getPath(String, String...)}) * @since v1-alpha8 */ @@ -161,6 +166,7 @@ public final class FileAccess { /** * Creates and initializes an instance of this class. * + * @param uri {@link URI} to the path you wish to access * @throws FileSystemNotFoundException if the filesystem is not supported by Java * @throws IllegalArgumentException if the URI is improperly formatted * @since v1-alpha8 @@ -179,6 +185,7 @@ public final class FileAccess { *

* Only works during early engine startup. * + * @throws IOException on an IO error * @since v1-alpha8 */ public static void initializeInstances() throws IOException { @@ -227,6 +234,8 @@ public final class FileAccess { /** * Formats the path into a {@link Path} instance. * + * @param path path to format + * @return formatted {@link Path} * @since v1-alpha8 */ public static @NotNull Path formatPath(@NotNull String path) { @@ -240,6 +249,8 @@ public final class FileAccess { /** * Unformats the a {@link Path} instance into a string. * + * @param path {@link Path} to unformat + * @return unformatted path * @since v1-alpha8 */ public static @NotNull String unformatPath(@NotNull Path path) { @@ -393,6 +404,7 @@ public final class FileAccess { * POSIX {@code rwxrwxrwx} format. * * @return POSIX permissions format + * @throws IOException on an IO error * @since v1-alpha8 */ public @NotNull String getPosixPermissions() throws IOException { @@ -625,7 +637,8 @@ public final class FileAccess { * Creates a symbolic link at this location. * If it already exists, nothing will be done. * - * @param hard creates a hard link if {@code true} or a symbolic link if {@code false} + * @param hard creates a hard link if {@code true} or a symbolic link if {@code false} + * @param destination destination of the new link * @return this instance * @throws IOException on an IO error * @since v1-alpha8