void (Method method, Object[] args) { assertDispatchThread(); if(myCurrentDispatchMethod != null) { LOG.error("Event cannot be raised when dispatching another event is in progress. Dispatching " + myCurrentDispatchMethod.getName()); } method.setAccessible(true); ourDispatchingEventsCounter++; myCurrentDispatchMethod = method; myCurrentDispatchArgs = args; try { List<T> listeners = getListeners(); for (T listener : listeners) { myListenersState.put(listener, Boolean.FALSE); } for (T listener : listeners) { invoke(listener); } } finally { ourDispatchingEventsCounter--; myCurrentDispatchMethod = null; myCurrentDispatchArgs = null; } }