public static List<Class<?>> getAllSuperclasses(Class<?> cls) {
        var result = new ArrayList<Class<?>>();
        for(Class<?> superClass = cls.getSuperclass(); superClass != null; superClass = superClass.getSuperclass()) {
            result.add(superClass);
        }
        return result;
    }
Compares the config instances and lists any differences that will require service restart.

@param from The previous config.
@param to The new config.
@return An object describing the difference.
config-model/src/main/java/com/yahoo/vespa/model/utils/internal/ReflectionUtil.java