Object[] specificListeners = list.getListenerList(); for (int i = 0; i < specificListeners.length; i += 2) { result[index++] = (PropertyChangeListener) specificListeners[i + 1]; }
Iterator iterator2 = namedListeners.iterator(); while (iterator2.hasNext()) result[index++] = (PropertyChangeListenerProxy) iterator2.next();
  public synchronized PropertyChangeListener[] getPropertyChangeListeners(          String propertyName)  {    EventListenerList list       = (EventListenerList) propertyListeners.get(propertyName);    if (list == null)      return getPropertyChangeListeners();    int size = listeners.getListenerCount() + list.getListenerCount();    PropertyChangeListener[] result = new PropertyChangeListener[size];        // copy in the general listeners    int index = 0;    for (int i = 0; i < listeners.listenerList.length; i += 2)      {        result[index++]             = (PropertyChangeListener) listeners.listenerList[i + 1];      }        // copy in the specific listeners    Object[] specificListeners = list.getListenerList();    for (int i = 0; i < specificListeners.length; i += 2)      {        result[index++] = (PropertyChangeListener) specificListeners[i + 1];      }    return result;  }