Add constructor API documentation
All checks were successful
PRs & Pushes / test (push) Successful in 3m38s
PRs & Pushes / build-jars (push) Successful in 3m24s
PRs & Pushes / build-apidoc (push) Successful in 3m17s

This commit is contained in:
JeremyStar™ 2024-12-28 00:50:23 +01:00
parent c3223f0add
commit df3ef9829e
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
60 changed files with 80 additions and 2 deletions

View file

@ -26,6 +26,7 @@ import de.staropensource.engine.base.implementable.formatter.TwoCycleFormatterIm
* Formats a string using ANSI
* escape sequences.
*
* @constructor Initializes this formatter
* @since v1-alpha10
*/
class AnsiFormatter : TwoCycleFormatterImpl() {

View file

@ -28,6 +28,7 @@ import de.staropensource.engine.base.utility.dnihbd.BuildInformation
/**
* The ANSI subsystem.
*
* @constructor Initializes this subsystem
* @since v1-alpha10
*/
class AnsiSubsystem : Subsystem() {

View file

@ -35,6 +35,7 @@ import kotlin.reflect.KClass
* This class is responsible for starting
* and shutting the engine up or down.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Engine private constructor() {

View file

@ -40,6 +40,7 @@ import kotlin.reflect.KClass
/**
* Provides the engine configuration.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class EngineConfiguration private constructor() {

View file

@ -26,6 +26,8 @@ package de.staropensource.engine.base.exception
* After this occurs, it will no longer
* be possible to initialize the engine.
*
* @constructor Initializes this exception
* @param throwable [Throwable] which caused the initialization to fail
* @since v1-alpha10
*/
class EngineInitializationFailureException(val throwable: Throwable) : RuntimeException("The StarOpenSource Engine failed to initialize", throwable)

View file

@ -22,6 +22,9 @@ package de.staropensource.engine.base.exception
/**
* Thrown when a verification fails.
*
* @constructor Initializes this exception
* @param error error
* @param throwable [Throwable] which caused the verification to fail
* @since v1-alpha10
*/
class VerificationFailedException(val error: String? = null, val throwable: Throwable? = null) : RuntimeException(error, throwable)

View file

@ -23,6 +23,9 @@ package de.staropensource.engine.base.exception.io
* Thrown when being unable to
* find a file or directory.
*
* @constructor Initializes this exception
* @param path path which does not exist
* @param throwable [Throwable] which caused the file or directory to not be found
* @since v1-alpha10
*/
class FileOrDirectoryNotFoundException(val path: String, val throwable: Throwable? = null) : Exception("The file or directory '${path}' could not be found", throwable)

View file

@ -24,6 +24,9 @@ package de.staropensource.engine.base.exception.io
* fails due to it being larger
* than the heap.
*
* @constructor Initializes this exception
* @param path path of the file which is too large
* @param throwable [Throwable] which caused the file read to fail
* @since v1-alpha10
*/
class FileTooLargeException(val path: String, val throwable: Throwable? = null) : RuntimeException("Unable to read file '${path}' as it is larger than the configured heap size", throwable)

View file

@ -23,6 +23,9 @@ package de.staropensource.engine.base.exception.io
* Thrown when a general
* IO error occurs.
*
* @constructor Initializes this exception
* @param error error
* @param throwable [Throwable] which caused this IO error
* @since v1-alpha10
*/
class IOAccessException(val error: String? = null, val throwable: Throwable? = null) : RuntimeException(error, throwable)

View file

@ -25,6 +25,8 @@ import de.staropensource.engine.base.implementable.stream.Stream
* Thrown when trying to
* access a closed [Stream].
*
* @constructor Initializes this exception
* @param stream stream which was accessed
* @see Stream
* @see Stream.closed
* @since v1-alpha10

View file

@ -22,6 +22,7 @@ package de.staropensource.engine.base.implementable
/**
* Provides an API for the engine to talk to subsystems.
*
* @constructor Initializes this subsystem
* @since v1-alpha10
*/
abstract class Subsystem {

View file

@ -48,6 +48,7 @@ package de.staropensource.engine.base.implementable.formatter
* If an invalid tag is found it must be
* simply ignored.
*
* @constructor Initializes this formatter
* @since v1-alpha10
*/
abstract class Formatter {

View file

@ -31,6 +31,7 @@ package de.staropensource.engine.base.implementable.formatter
* unnecessary resource and memory usage for
* certain formatters.
*
* @constructor Initializes this formatter
* @see Formatter
* @since v1-alpha10
*/

View file

@ -31,6 +31,7 @@ package de.staropensource.engine.base.implementable.formatter
* unnecessary resource and memory usage for
* certain formatters.
*
* @constructor Initializes this formatter
* @see Formatter
* @since v1-alpha10
*/

View file

@ -38,6 +38,7 @@ import kotlin.text.iterator
* - `COLOR:` (example `COLOR:RED`)
* - `ATTRIBUTE:` (example `ATTRIBUTE:BOLD`)
*
* @constructor Initializes this formatter
* @see TwoCycleFormatter
* @see Formatter
* @since v1-alpha10

View file

@ -26,6 +26,7 @@ import de.staropensource.engine.base.type.logging.Feature
/**
* Builds log formats.
*
* @constructor Initializes this format builder
* @param call [Call] to build a format for
* @param channelSettings appropriate [ChannelSettings] instance
* @since v1-alpha10

View file

@ -22,6 +22,7 @@ package de.staropensource.engine.base.implementable.stream
/**
* A read-only [Stream].
*
* @constructor Initializes this stream
* @since v1-alpha10
*/
abstract class ReadStream : Stream(

View file

@ -31,6 +31,7 @@ import java.io.OutputStream
/**
* Makes streaming data easy.
*
* @constructor Initializes this stream
* @param streamMode supported [StreamMode]s
* @param autoFlushAfter after which amount of bytes to automatically flush. May be ignored by some implementations. Implementations should expose this argument in their constructor
* @since v1-alpha10
@ -706,6 +707,7 @@ abstract class Stream(
* An implementation of Java
* [InputStream]s for [Stream]s.
*
* @constructor Initializes this stream
* @param stream [Stream] to use
* @throws IOException on IO error
* @since v1-alpha10
@ -733,6 +735,7 @@ abstract class Stream(
* An implementation of Java
* [OutputStream]s for [Stream]s.
*
* @constructor Initializes this stream
* @param stream [Stream] to use
* @since v1-alpha10
*/

View file

@ -22,6 +22,7 @@ package de.staropensource.engine.base.implementable.stream
/**
* A write-only [Stream].
*
* @constructor Initializes this stream
* @param autoFlushAfter after which amount of bytes to automatically flush. May be ignored by some implementations. Implementations should expose this argument in their constructor
* @since v1-alpha10
*/

View file

@ -26,6 +26,7 @@ import kotlin.system.exitProcess
* [ShutdownHandler] implementation using
* Kotlin's [exitProcess] method.
*
* @constructor Initializes this shutdown handler
* @since v1-alpha10
*/
class KotlinShutdownHandler private constructor() : ShutdownHandler {

View file

@ -27,6 +27,7 @@ import kotlin.text.iterator
* Swallows all formatting tags
* and returns a clean format.
*
* @constructor Initializes this formatter
* @see Formatter
* @since v1-alpha10
*/

View file

@ -27,6 +27,8 @@ import de.staropensource.engine.base.utility.FileAccess
* [Adapter] for writing log
* output to the specific file.
*
* @constructor Initializes this adapter
* @param location file to write log output to
* @see Adapter
* @since v1-alpha10
*/

View file

@ -26,6 +26,7 @@ import de.staropensource.engine.base.type.logging.Call
* [Adapter] for printing messages
* using Kotlin's [println] method.
*
* @constructor Initializes this adapter
* @see Adapter
* @since v1-alpha10
*/

View file

@ -26,6 +26,7 @@ import de.staropensource.engine.base.utility.dnihbd.BuildInformation
* [CrashCategory] implementation
* providing information about the engine.
*
* @constructor Initializes this crash category
* @since v1-alpha10
*/
class EngineCrashCategory private constructor() : BuildInformation.BuildInformationCrashCategory() {

View file

@ -32,6 +32,7 @@ import kotlinx.datetime.toLocalDateTime
* providing information about the
* environment the engine runs in.
*
* @constructor Initializes this crash category
* @since v1-alpha10
*/
class EnvironmentCrashCategory private constructor() : CrashCategory {

View file

@ -28,6 +28,7 @@ import de.staropensource.engine.base.utility.misc.StackTraceUtils
* [CrashCategory] implementation
* providing insight into a crash.
*
* @constructor Initializes this crash category
* @since v1-alpha10
*/
class InfoCrashCategory private constructor() : CrashCategory {

View file

@ -41,6 +41,7 @@ import kotlin.time.Duration
* [505ms] [03.10.1990 23:23:23] [INFO de.staropensource.engine.testapp.Main#sayHi~42] Hello World!
* ```
*
* @constructor Initializes this format builder
* @param call [Call] to build a format for
* @param channelSettings appropriate [ChannelSettings] instance
* @since v1-alpha10

View file

@ -28,6 +28,7 @@ import java.io.ByteArrayInputStream
* A [Stream] which can
* only read [Byte]s.
*
* @constructor Initializes this stream
* @param bytesRead [ByteArray] to provide for reading
* @since v1-alpha10
*/

View file

@ -27,6 +27,7 @@ import java.io.ByteArrayInputStream
* A [Stream] which can
* read and write [Byte]s.
*
* @constructor Initializes this stream
* @param bytesRead [ByteArray] to provide for reading
* @since v1-alpha10
*/

View file

@ -27,6 +27,7 @@ import de.staropensource.engine.base.implementable.stream.WriteStream
* A [Stream] which can
* only write [Byte]s.
*
* @constructor Initializes this stream
* @since v1-alpha10
*/
open class ByteWriteStream : WriteStream(

View file

@ -31,6 +31,7 @@ import java.io.InputStream
* accessing files via the [FileAccess]
* API.
*
* @constructor Initializes this stream
* @param file [FileAccess] to use
* @see FileAccess.toStream
* @since v1-alpha10

View file

@ -30,6 +30,7 @@ import java.io.InputStream
* it's calls instances of Java's
* [InputStream] class.
*
* @constructor Initializes this stream
* @param inputStream Java's [InputStream] to read from
* @param autoCloseJavaStream if to automatically close the supplied [InputStream] if [close] is invoked
* @since v1-alpha10

View file

@ -31,6 +31,7 @@ import java.io.OutputStream
* [InputStream] and [OutputStream]
* classes.
*
* @constructor Initializes this stream
* @param inputStream Java's [InputStream] to read from
* @param outputStream Java's [OutputStream] to write to
* @param autoCloseJavaStreams if to automatically close the supplied [InputStream] and [OutputStream] if [close] is invoked

View file

@ -30,6 +30,7 @@ import java.io.OutputStream
* it's calls instances of Java's
* [OutputStream] class.
*
* @constructor Initializes this stream
* @param outputStream Java's [OutputStream] to write to
* @param autoCloseJavaStream if to automatically close the supplied [OutputStream] if [close] is invoked
* @param autoFlushAfter after which amount of bytes to automatically flush. May be ignored by some implementations. Implementations should expose this argument in their constructor

View file

@ -32,6 +32,7 @@ import de.staropensource.engine.base.utility.FileAccess
* A log message is only printed
* after a newline (`\n`) is written.
*
* @constructor Initializes this stream
* @param logger [Logger] instance to use
* @see FileAccess.toStream
* @since v1-alpha10

View file

@ -25,6 +25,7 @@ import de.staropensource.engine.base.implementable.stream.Stream
* A [Stream] which does nothing
* and cannot even be closed.
*
* @constructor Initializes this stream
* @since v1-alpha10
*/
class NullStream private constructor() : Stream(streamMode = StreamMode.READ_WRITE) {

View file

@ -25,6 +25,7 @@ import de.staropensource.engine.base.implementable.stream.Stream
* A [Stream] which can
* only read strings.
*
* @constructor Initializes this stream
* @param stringRead string to provide for reading
* @since v1-alpha10
*/

View file

@ -25,6 +25,7 @@ import de.staropensource.engine.base.implementable.stream.Stream
* A [Stream] which can
* read and write strings.
*
* @constructor Initializes this stream
* @param stringRead string to provide for reading
* @since v1-alpha10
*/

View file

@ -25,6 +25,7 @@ import de.staropensource.engine.base.implementable.stream.Stream
* A [Stream] which can
* only write strings.
*
* @constructor Initializes this stream
* @since v1-alpha10
*/
open class StringWriteStream : ByteWriteStream() {

View file

@ -30,6 +30,7 @@ import de.staropensource.engine.base.type.logging.ChannelSettings
/**
* Handles crashes.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class CrashHandler private constructor() {

View file

@ -25,6 +25,7 @@ import de.staropensource.engine.base.type.logging.Call
/**
* Handles call filtering.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Filterer private constructor() {

View file

@ -39,6 +39,7 @@ import kotlinx.datetime.Instant
* with internal classes while leaving the
* unimportant bits out.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Logger {

View file

@ -37,6 +37,7 @@ import kotlin.reflect.full.primaryConstructor
* This class will parse, process,
* reformat and finally print log messages.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Processor private constructor() {

View file

@ -24,6 +24,7 @@ import de.staropensource.engine.base.EngineConfiguration
/**
* Holds data about a method caller.
*
* @constructor Initializes this class
* @param packageName fully qualified name of the package where the calling class is in
* @param className name of the calling class
* @param methodName name of the calling method

View file

@ -25,6 +25,7 @@ import de.staropensource.engine.base.type.Origin
/**
* Holds information about log calls.
*
* @constructor Initializes this class
* @param origin caller origin
* @param level level
* @param message message

View file

@ -29,12 +29,13 @@ import de.staropensource.engine.base.implementation.logging.adapter.PrintlnAdapt
* Holds the configuration of one
* or multiple log channels.
*
* @constructor Initializes this class
* @param enable enables or disables all log messages utilising this channel. Defaults to the global value or `true` if set to `null`
* @param sanitizeMessage if message sanitization (escaping `<`) should be performed. Defaults to the global value or `true` if set to `null`
* @param permitFormatting if formatting shall be permitted for the entire format. For disallowing formatting for the message only, see [sanitizeMessage]. Defaults to the global value or `true` if set to `null`
* @param applicationName name of the application. Used in crash reports. Defaults to the global value or `"This application"` if `null`
* @param formatter determines how messages are formatted and stylized. Defaults to the global value or [NoOperationFormatter] if set to `null`
* @param adapter used for printing the finalized log format somewhere. Defaults to the global value [PrintlnAdapter] if set to `null`
* @param adapters used for printing the finalized log format somewhere. Defaults to the global value [PrintlnAdapter] if set to `null`
* @since v1-alpha10
*/
data class ChannelSettings(

View file

@ -24,9 +24,10 @@ package de.staropensource.engine.base.type.versioning
* [SOSVS](z.staropensource.de/spec-versioning)
* specifications.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class VersionType {
class VersionType private constructor() {
/**
* Represents the version types
* found in the [second iteration](z.staropensource.de/spec-versioning-v2)

View file

@ -27,6 +27,7 @@ import java.util.Locale
/**
* Converts between various data size units.
*
* @constructor Initializes this class
* @param bytes bytes to convert
* @since v1-alpha10
*/

View file

@ -31,6 +31,7 @@ import oshi.hardware.HardwareAbstractionLayer
* Provides information about the
* environment the application runs in.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
@Suppress("Unused")
@ -456,6 +457,7 @@ class Environment private constructor() {
/**
* Represents a graphics card.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class GraphicsCard internal constructor(val graphicsCard: oshi.hardware.GraphicsCard) {

View file

@ -41,6 +41,7 @@ import java.nio.file.attribute.PosixFilePermissions
* Provides a simplified way of
* accessing files and directories.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
@Suppress("Unused")
@ -1472,6 +1473,7 @@ class FileAccess {
* {@link FileVisitor} instance for
* copying directories recursively.
*
* @constructor Initializes this class
* @param source source to copy from
* @param destination destination to copy to
* @since v1-alpha9
@ -1503,6 +1505,7 @@ class FileAccess {
* {@link FileVisitor} instance for
* delete directories recursively.
*
* @constructor Initializes this class
* @since v1-alpha9
*/
private class DeleteDirectoryVisitor : FileVisitor<Path> {

View file

@ -358,6 +358,7 @@ class Process {
* Used for the [standardInput]
* stream of a [Process].
*
* @constructor Initializes this stream
* @since v1-alpha10
*/
private class StandardInputStream(
@ -395,6 +396,7 @@ class Process {
* and [standardError] streams
* of a [Process].
*
* @constructor Initializes this stream
* @since v1-alpha10
*/
private class StandardOutputErrorStream(

View file

@ -47,6 +47,7 @@ import java.util.*
* `help what does this do i don't
* understand :neofox_woozy:` disease.
*
* @constructor Initializes this class
* @param loadPrefix prefix used for accessing the files
* @param loadLocation location used for accessing the files. Set to `null` to use the JAR's bundled resources.
* @since v1-alpha10
@ -430,6 +431,7 @@ open class BuildInformation
* A [CrashCategory] implementation providing
* details about your running build.
*
* @constructor Initializes this crash category
* @since v1-alpha10
*/
abstract class BuildInformationCrashCategory : CrashCategory {

View file

@ -22,6 +22,7 @@ package de.staropensource.engine.base.utility.misc
/**
* REALLY miscellaneous methods are in here.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Miscellaneous private constructor() {

View file

@ -26,6 +26,7 @@ import java.lang.reflect.InvocationTargetException
* Utility methods for stack trace
* and exception analysis.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class StackTraceUtils private constructor() {

View file

@ -28,6 +28,7 @@ import de.staropensource.engine.testing.TestBase
* This class sets some nice defaults
* and adds other things only useful to us.
*
* @constructor Initializes this class
* @param autoManage automatically initializes and shuts the engine down after each test
* @param logLevels contains the allowed log levels
* @param shutdownMarksFailure whether engine shutdowns should mark the test as failed

View file

@ -23,6 +23,7 @@ package de.staropensource.engine.newsubprj
/**
* An example class.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Example private constructor() {

View file

@ -28,6 +28,7 @@ import de.staropensource.engine.base.type.logging.Level
/**
* Testing program for the StarOpenSource Engine.
*
* @constructor Initializes this class
* @since v1-alpha10
*/
class Main private constructor() {

View file

@ -37,6 +37,7 @@ import kotlin.jvm.optionals.getOrNull
/**
* Base class for implementing tests.
*
* @constructor Initializes this class
* @param autoManage automatically initializes and shuts the engine down after each test
* @param suppressInitAndShutdownLogging if to suppress the engine's log output during engine initialization and shutdown. Only takes effect if [autoManage] is `true`
* @param logLevels contains the allowed log levels

View file

@ -26,6 +26,7 @@ import kotlin.test.fail
* [ShutdownHandler] implementation which
* causes the test to fail if executed.
*
* @constructor Initializes this shutdown handler
* @since v1-alpha10
*/
class FailureShutdownHandler private constructor() : ShutdownHandler {

View file

@ -26,6 +26,7 @@ import kotlin.test.fail
* [ShutdownHandler] implementation which
* causes the test to fail if executed.
*
* @constructor Initializes this shutdown handler
* @since v1-alpha10
*/
class NoOperationShutdownHandler private constructor() : ShutdownHandler {