It would be nice if ApplicationListenerMethodAdapter
exposed a variant of its already existing but private shouldHandle(ApplicationEvent, Object[])
to inspect whether a listener is actually interested in an event instance. This would allow finding out whether, for example, a condition defined in @(Transactional)EventListener
will ultimately cause the event instance not being handled, even though the listener might be generally interested in events of a particular type.