private static Set<Class<?>> getAllRelatedClassesOf(Class<?> c) {
        Set<Class<?>> a = new LinkedHashSet<>();
        a.add(c);
        for (Class<?> class1 : c.getInterfaces())
            a.addAll(getAllRelatedClassesOf(class1));
        Class<?> superClass = c.getSuperclass();
        if (superClass != null)
            a.add(superClass);
        // System.out.println( a.stream().map(x ->
        // x.getSimpleName()).collect(Collectors.toList()));
        return a;
    }