private void deleteServiceFromTypes(ServiceType type,SvcReg reg){
  Map map=(Map)serviceByTypeName.get(type.getName());
  if (map != null) {
    map.remove(reg.item.serviceID);
    if ((map.isEmpty()) && !type.equals(objectServiceType))     serviceByTypeName.remove(type.getName());
    ServiceType[] ifaces=type.getInterfaces();
    for (int j=ifaces.length; --j >= 0; ) {
      deleteServiceFromTypes(ifaces[j],reg);
    }
    ServiceType sup=type.getSuperclass();
    if (sup != null)     deleteServiceFromTypes(sup,reg);
  }
}

private void deleteServiceFromTypes ( ServiceType type , SvcReg reg ) { Map map = ( Map ) serviceByTypeName . get ( type . getName ( ) ) ; if ( map != null ) { map . remove ( reg . item . serviceID ) ; if ( ( map . isEmpty ( ) ) && ! type . equals ( objectServiceType ) ) serviceByTypeName . remove ( type . getName ( ) ) ; ServiceType [ ] ifaces = type . getInterfaces ( ) ; for ( int j = ifaces . length ; -- j >= 0 ; ) { deleteServiceFromTypes ( ifaces [ j ] , reg ) ; } ServiceType sup = type . getSuperclass ( ) ; if ( sup != null ) deleteServiceFromTypes ( sup , reg ) ; } }
deletes a service registration from types in its hierarchy
