assDoc.isTrait()) classes += new org.codehaus.groovy.tools.groovydoc.ExternalGroovyClassDoc(Object.class)
        }
        Set visited = [classDoc] as Set
        while (classes) {
            Set nextLevel = []
            classes.eachWithIndex { c,i ->
                if (c.isInterface()) nextLevel.addAll(c.interfaces().toList())
                else if (c.superclass() && c.qualifiedTypeName() != 'java.lang.Object') nextLevel += c.superclass()
                nextLevel -= visited
                visited 