Companion

object Companion

Holds utilities and shared logger for the event system.

Properties

Link copied to clipboard

Global cache of compiled event handler invokers, keyed by the reflective Method they were generated from.

Link copied to clipboard

Global cache of compiled exception handler invokers, keyed by the reflective Method they were generated from.

Link copied to clipboard
private val logger: Logger?

Shared logger instance used for reporting reflection failures, lambda generation issues, and other internal runtime diagnostics.

Functions

Link copied to clipboard
private fun allDeclaredMethods(klass: Class<*>): Sequence<Method>

Retrieves all declared methods from the given class, its superclasses, and interfaces.

Link copied to clipboard
private fun createEventInvoker(method: Method): EventInvoker

Creates an EventInvoker for the given handler method.

Link copied to clipboard

Creates an ExceptionInvoker for a method annotated with @ExceptionHandler.

Link copied to clipboard
private fun Method.isValidEventHandler(allowStatic: Boolean = false): Boolean

Validates whether a method qualifies as an event handler.

Link copied to clipboard
private fun Method.isValidExceptionHandler(allowStatic: Boolean = false): Boolean

Determines whether this method is a valid @ExceptionHandler method according to the event system's rules.

Link copied to clipboard
private fun <T : Priority> sharedSubscribeLogic(methodCache: Cache<Class<out Event>, List<T>>, objectCache: Cache<Any, List<Class<out Event>>>, staticCache: Cache<Class<*>, List<Class<out Event>>>, eventClass: Class<out Event>, priority: Int, handlerEntry: T, any: Any? = null, type: Class<*>? = null)

Shared internal logic for registering both event handlers and exception handlers.

Link copied to clipboard

Computes a relative "specificity" rank for this exception handler entry.