private static void getAllInterfaces(Class<?> cls, final HashSet<Class<?>> interfacesFound) {
        while (cls != null) {
            final Class<?>[] interfaces = cls.getInterfaces();

            for (final Class<?> i : interfaces) {
                if (interfacesFound.add(i)) {
                    getAllInterfaces(i, interfacesFound);
                }
            }

            cls = cls.getSuperclass();
        }
    }
Gets the interfaces for the specified class.

@param cls             the class to look up, may be {@code null}
@param interfacesFound the {@code Set} of interfaces for the class
fastexcel-core/src/main/java/cn/idev/excel/util/ClassUtils.java