private void addServiceByTypes(ServiceType type,SvcReg reg){
  Map map=(Map)serviceByTypeName.get(type.getName());
  if (map == null) {
    map=new HashMap();
    serviceByTypeName.put(type.getName(),map);
  }
  map.put(reg.item.serviceID,reg);
  ServiceType[] ifaces=type.getInterfaces();
  for (int i=ifaces.length; --i >= 0; ) {
    addServiceByTypes(ifaces[i],reg);
  }
  ServiceType sup=type.getSuperclass();
  if (sup != null)   addServiceByTypes(sup,reg);
}

private void addServiceByTypes ( ServiceType type , SvcReg reg ) { Map map = ( Map ) serviceByTypeName . get ( type . getName ( ) ) ; if ( map == null ) { map = new HashMap ( ) ; serviceByTypeName . put ( type . getName ( ) , map ) ; } map . put ( reg . item . serviceID , reg ) ; ServiceType [ ] ifaces = type . getInterfaces ( ) ; for ( int i = ifaces . length ; -- i >= 0 ; ) { addServiceByTypes ( ifaces [ i ] , reg ) ; } ServiceType sup = type . getSuperclass ( ) ; if ( sup != null ) addServiceByTypes ( sup , reg ) ; }
adds a service registration to types in its hierarchy
