StaticExceptionHandlerEntryWithThrowable

internal data class StaticExceptionHandlerEntryWithThrowable(val owner: Class<*>, val invoker: StaticExceptionInvokers, val priority: Int, val throwableType: Class<out Throwable>) : ExceptionHandlerEntryWithThrowable

Internal representation of a static exception handler that declares a throwable parameter.

This entry corresponds to @ExceptionHandler methods declared as static (in Java) or @JvmStatic (in Kotlin) with one of the following shapes:

  • (event: Event, throwable: Throwable)

  • (throwable: Throwable)

Unlike instance-bound handlers, static handlers are not tied to a specific subscriber object and therefore do not use weak references. They remain active until explicitly unregistered by the event bus.

The throwableType property records the declared throwable parameter type (e.g. IOException, Exception, Throwable). During dispatch, the event system only invokes this handler when:

  • the event type is compatible (based on the event-method cache key and hierarchy traversal), and

  • throwableType.isInstance(thrown) is true.

Constructors

Link copied to clipboard
constructor(owner: Class<*>, invoker: StaticExceptionInvokers, priority: Int, throwableType: Class<out Throwable>)

Properties

Link copied to clipboard
open override val invoker: StaticExceptionInvokers

the compiled StaticExceptionInvokers strategy used to invoke the underlying handler method.

Link copied to clipboard
val owner: Class<*>

the declaring class that owns the static exception handler method. Used to group and unregister static handlers from the same class.

Link copied to clipboard
open override val priority: Int

execution ordering hint; higher values are invoked before lower values when multiple handlers match the same failure.

Link copied to clipboard
open override val throwableType: Class<out Throwable>

the declared throwable parameter type used to filter which exceptions this handler should observe.

Functions

Link copied to clipboard

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