private static List<Class<?>> expandInterfaceHierarchy(Class<?> clazz) {
        List<Class<?>> res = new ArrayList<Class<?>>();
        res.add(clazz);
        expandInterfaceHierarchy(clazz, res);
        return res;
    }
private static List < Class < ? > > expandInterfaceHierarchy ( Class < ? > clazz ) { List < Class < ? > > res = new ArrayList < Class < ? > > ( ) ; res . add ( clazz ) ; expandInterfaceHierarchy ( clazz , res ) ; return res ; }
/*
Returns a list of super-interface breadth-first.