code: private void addStats(final Map<WComponent, Stat> statsMap, final WComponent comp) {
  		Stat stat = createStat(comp);
  		statsMap.put(comp, stat);
  
  		if (comp instanceof Container) {
  			Container container = (Container) comp;
  			int childCount = container.getChildCount();
  
  			for (int i = 0; i < childCount; i++) {
  				WComponent child = container.getChildAt(i);
  				addStats(statsMap, child);
  			}
  		}
  	}
docs: Recursively adds statistics for a component and its children to the stats map.
  
  @param statsMap the stats map to add to.
  @param comp the component to analyse.