private Collection < ClassDoc > subinterfaces ( ClassDoc cd ) { Collection < ClassDoc > ret = classToSubinterface . get ( cd . qualifiedName ( ) ) ; if ( ret == null ) { ret = new TreeSet <> ( utils . makeComparatorForClassUse ( ) ) ; SortedSet < ClassDoc > subs = classtree . subinterfaces ( cd ) ; if ( subs != null ) { ret . addAll ( subs ) ; for ( ClassDoc sub : subs ) { ret . addAll ( subinterfaces ( sub ) ) ; } } addAll ( classToSubinterface , cd , ret ) ; } return ret ; }
Return all subinterfaces of an interface AND fill - in classToSubinterface map .