StaticEventHandlerEntry

internal data class StaticEventHandlerEntry(val owner: Class<*>, val invoker: StaticEventInvoker, val priority: Int, val runIfCanceled: Boolean) : EventHandlerEntry

Internal representation of a static event handler.

A StaticEventHandlerEntry describes a handler method that is declared as static (in Java) or as a @JvmStatic member on a Kotlin object/companion. Unlike InstanceEventHandlerEntry, it is not tied to a specific subscriber instance and therefore does not rely on weak references for lifecycle management.

Static handlers remain active until they are explicitly unregistered by the event bus (e.g. via a static unsubscribe API).

Constructors

Link copied to clipboard
constructor(owner: Class<*>, invoker: StaticEventInvoker, priority: Int, runIfCanceled: Boolean)

Properties

Link copied to clipboard
open override val invoker: StaticEventInvoker

a precompiled StaticEventInvoker that performs the actual call to the underlying handler method.

Link copied to clipboard
val owner: Class<*>

the declaring class that owns the static handler method. This is used to group and unregister static handlers that originate from the same class.

Link copied to clipboard
open override val priority: Int

execution ordering hint used when multiple handlers listen to the same event type; higher values are invoked first.

Link copied to clipboard
open override val runIfCanceled: Boolean

whether this handler should continue to receive events after they have been marked as canceled, subject to the active com.smushytaco.event_library.api.CancelMode.