public Class<? extends UsbSerialDriver> findDriver(final UsbDevice usbDevice) {
        final Pair<Integer, Integer> pair = Pair.create(usbDevice.getVendorId(), usbDevice.getProductId());
        Class<? extends UsbSerialDriver> driverClass = mVidPidProbeTable.get(pair);
        if (driverClass != null)
            return driverClass;
        for (Map.Entry<Method, Class<? extends UsbSerialDriver>> entry : mMethodProbeTable.entrySet()) {
            try {
                Method method = entry.getKey();
                Object o = method.invoke(null, usbDevice);
                if((boolean)o)
                    return entry.getValue();
            } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
                throw new RuntimeException(e);
            }
        }
        return null;
    }
Returns the driver for the given USB device, or {@code null} if no match.

@param usbDevice the USB device to be probed
@return the driver class matching this pair, or {@code null}
usbSerialForAndroid/src/main/java/com/hoho/android/usbserial/driver/ProbeTable.java