ExceptionSignatureKind

Enumerates the supported method signatures for @ExceptionHandler methods.

Each enum entry corresponds to one of the valid shapes an exception handler method may take. Signatures are matched polymorphically: a parameter typed as a supertype of the actual event or exception is still considered compatible.

Constructors

Link copied to clipboard
private constructor()

Entries

Link copied to clipboard

Represents an exception handler method with two parameters:

Link copied to clipboard

Represents an exception handler method with a single event parameter:

Link copied to clipboard

Represents an exception handler method with a single throwable parameter:

Types

Link copied to clipboard
object Companion

Companion object providing the extension that inspects a reflective Method and determines whether it represents a supported exception handler signature.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun getEventClass(method: Method): Class<out Event>

Resolves the logical event type associated with this exception-handler signature.

Link copied to clipboard

Extracts the declared throwable parameter type from an exception–handler method, when applicable.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.