code: public static Class<?> getInterface(Class<?> target, ClassFilter filter) {
          Set<Class<?>> interfaces = getInterfaces(target, filter);
          if (!interfaces.isEmpty()) {
              return interfaces.iterator().next();
          }
          return null;
      }
docs: Returns the interface from target class that passes the supplied filter.
  This method also inspects any interfaces implemented by super classes.
  
  If no interface is found null is returned.
  
  @param filter  The class filter to use.
  
  @return the interface from target class that passes the supplied filter, may
  be null if no match is found.