public void addSource(ITLAPMOutputSource source){
  ITLAPMOutputSource existingSource=(ITLAPMOutputSource)sources.get(source.getFullModulePath());
  if (existingSource != null) {
    ITLAPMOutputSourceListener[] existingListeners=existingSource.getListeners();
    for (int i=0; i < existingListeners.length; i++) {
      source.addListener(existingListeners[i]);
      existingSource.removeListener(existingListeners[i]);
    }
  }
 else {
    List list=(List)listenerLists.get(source.getFullModulePath());
    if (list != null) {
      for (Iterator it=list.iterator(); it.hasNext(); ) {
        source.addListener((ITLAPMOutputSourceListener)it.next());
        it.remove();
      }
    }
  }
  sources.put(source.getFullModulePath(),source);
}

public void addSource ( ITLAPMOutputSource source ) { ITLAPMOutputSource existingSource = ( ITLAPMOutputSource ) sources . get ( source . getFullModulePath ( ) ) ; if ( existingSource != null ) { ITLAPMOutputSourceListener [ ] existingListeners = existingSource . getListeners ( ) ; for ( int i = 0 ; i < existingListeners . length ; i ++ ) { source . addListener ( existingListeners [ i ] ) ; existingSource . removeListener ( existingListeners [ i ] ) ; } } else { List list = ( List ) listenerLists . get ( source . getFullModulePath ( ) ) ; if ( list != null ) { for ( Iterator it = list . iterator ( ) ; it . hasNext ( ) ; ) { source . addListener ( ( ITLAPMOutputSourceListener ) it . next ( ) ) ; it . remove ( ) ; } } } sources . put ( source . getFullModulePath ( ) , source ) ; }
adds a source to this registry . this source will replace the most recently added source such that existingsource . getfullmodulepath ( ) . equals ( newsource . getfullmodulepath ( ) ) .
