isValidEventHandler

private fun Method.isValidEventHandler(allowStatic: Boolean = false): Boolean

Validates whether a method qualifies as an event handler.

Conditions:

  • Annotated with EventHandler,

  • Returns void,

  • Has exactly one parameter,

  • Parameter type is assignable to Event.

Used during subscriber introspection.

Receiver

the reflective method being checked

Parameters

allowStatic

if true, only static methods are accepted; if false, only instance methods are accepted.