private static boolean hasAttr(SvcReg reg,EntryClass eclass,int fldidx,Object value){
  EntryRep[] sets=reg.item.attributeSets;
  for (int i=sets.length; --i >= 0; ) {
    EntryRep set=sets[i];
    if (eclass.isAssignableFrom(set.eclass) && ((value == null && set.fields[fldidx] == null) || (value != null && value.equals(set.fields[fldidx]))))     return true;
  }
  return false;
}

private static boolean hasAttr ( SvcReg reg , EntryClass eclass , int fldidx , Object value ) { EntryRep [ ] sets = reg . item . attributeSets ; for ( int i = sets . length ; -- i >= 0 ; ) { EntryRep set = sets [ i ] ; if ( eclass . isAssignableFrom ( set . eclass ) && ( ( value == null && set . fields [ fldidx ] == null ) || ( value != null && value . equals ( set . fields [ fldidx ] ) ) ) ) return true ; } return false ; }
test if the service has an entry of the given class or subclass with a field of the given value .
