if(c == null) { return false; }
    public boolean doesImplement(Class c, String interfaceName)        throws Exception {        Class[] interfaces = c.getInterfaces();        for (int i = 0; i < interfaces.length; i++) {            String name = interfaces[i].toString();             if (name.substring(name.indexOf(' ') + 1).equals(interfaceName)) {                return true;            }        }        return false;    }