private static List<Class<?>> allSuperClasses(Class<?> clazz) {
        List<Class<?>> ret = new ArrayList<>();
        while (clazz != null) {
            ret.add(clazz);
            clazz = clazz.getSuperclass();
        }
        return ret;
    }
@author Tony Vaagenes
@author gjoranv
@author ollivir
container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentNode.java