LangMan

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Represents the severity level of a log message.

Properties

Link copied to clipboard
val convertToFinalType: <Error class: unknown class>

A mutable map that associates a Class type with a conversion function. The conversion function transforms an input of type Any into an Any object of the specified target class type.

Link copied to clipboard
Link copied to clipboard

A mutable map that holds localized messages organized by language codes and message keys.

Link copied to clipboard
val replaceLogic: <Error class: unknown class>

A mutable map that manages replacement logic for specific types.

Functions

Link copied to clipboard
Link copied to clipboard
fun getMessage(key: MessageKey<E, C>, lang: String = Locale.getDefault().language): C
fun <K, V> getMessage(key: MessageKey<E, C>, argsComplete: Map<K, V>, lang: String = Locale.getDefault().language): C
Link copied to clipboard
fun logIfDebug(message: String, level: LangMan.LogLevel = LogLevel.INFO)

Logs a message at the specified log level if the debug mode is enabled. If the debug mode is not enabled, the message will be logged using the debug level.

Link copied to clipboard
inline fun <I : Any, C : Any> registerConversionLogic(noinline converter: (I) -> C)

Registers a conversion logic from type I to type C.

fun <I : Any, C : Any> registerConversionLogic(clazz: Class<C>, converter: (I) -> C)
Link copied to clipboard
inline fun <I : Any> registerReplacementLogic(noinline logic: (I, String, I) -> I)
fun <I : Any> registerReplacementLogic(clazz: Class<I>, logic: (I, String, I) -> I)