getListenerCount abstract method

int getListenerCount()

Returns the number of listeners.

If this method is called during the processing of the execution of the notify listeners operation and listeners were added or removed at that time, then the number of these listeners is not taken into account.

The main purpose of this method is to obtain information about the state of this instance when testing the operation of other objects.

Implementation

int getListenerCount();