subscribeStatic

open override fun subscribeStatic(type: Class<*>)

Registers a class containing static handler methods.

All static (or @JvmStatic) functions on type annotated with EventHandler or ExceptionHandler and having a supported signature are discovered and registered automatically.

Unlike instance-based subscription:

  • Static handlers do not require an object instance.

  • Their lifetime persists until explicitly unregistered via unsubscribeStatic.

  • They are not subject to weak-reference cleanup.

Calling subscribeStatic more than once for the same class is a no-op.

Parameters

type

the class containing static handler methods to register.