public boolean match(final ServiceReference reference){
  try {
    return match(((ServiceReferenceImpl)reference).properties);
  }
 catch (  final ClassCastException ce) {
    final Dictionary<String,Object> dict=new Hashtable<String,Object>();
    final String[] keys=reference.getPropertyKeys();
    for (int i=0; i < keys.length; i++) {
      dict.put(keys[i],reference.getProperty(keys[i]));
    }
    return match(dict);
  }
}

public boolean match ( final ServiceReference reference ) { try { return match ( ( ( ServiceReferenceImpl ) reference ) . properties ) ; } catch ( final ClassCastException ce ) { final Dictionary < String , Object > dict = new Hashtable < String , Object > ( ) ; final String [ ] keys = reference . getPropertyKeys ( ) ; for ( int i = 0 ; i < keys . length ; i ++ ) { dict . put ( keys [ i ] , reference . getProperty ( keys [ i ] ) ) ; } return match ( dict ) ; } }
check if the filter matches a service reference .
