private void addAttrs(SvcReg reg,EntryRep entry){
  EntryClass eclass=entry.eclass;
  addInstance(eclass);
  Object[] fields=entry.fields;
  if (fields.length > 0) {
    for (int i=fields.length; --i >= 0; ) {
      eclass=getDefiningClass(eclass,i);
      addAttr(reg,eclass,i,fields[i]);
    }
    return;
  }
  ArrayList regs=(ArrayList)serviceByEmptyAttr.get(eclass);
  if (regs == null) {
    regs=new ArrayList(2);
    regs.add(reg);
    serviceByEmptyAttr.put(eclass,regs);
  }
 else   if (!regs.contains(reg)) {
    regs.add(reg);
  }
}

private void addAttrs ( SvcReg reg , EntryRep entry ) { EntryClass eclass = entry . eclass ; addInstance ( eclass ) ; Object [ ] fields = entry . fields ; if ( fields . length > 0 ) { for ( int i = fields . length ; -- i >= 0 ; ) { eclass = getDefiningClass ( eclass , i ) ; addAttr ( reg , eclass , i , fields [ i ] ) ; } return ; } ArrayList regs = ( ArrayList ) serviceByEmptyAttr . get ( eclass ) ; if ( regs == null ) { regs = new ArrayList ( 2 ) ; regs . add ( reg ) ; serviceByEmptyAttr . put ( eclass , regs ) ; } else if ( ! regs . contains ( reg ) ) { regs . add ( reg ) ; } }
put the service in the servicebyattr map under all attribute values in the given entry , or in the servicebyemptyattr map if the entry has no attributes , add a new instance of the entryclass , and update entryclasses as necessary .
