private Collection < TypeElement > subinterfaces ( TypeElement te ) { Collection < TypeElement > ret = classToSubinterface . get ( te ) ; if ( ret == null ) { ret = new TreeSet <> ( utils . makeClassUseComparator ( ) ) ; Set < TypeElement > subs = classtree . subInterfaces ( te ) ; if ( subs != null ) { ret . addAll ( subs ) ; for ( TypeElement sub : subs ) { ret . addAll ( subinterfaces ( sub ) ) ; } } addAll ( classToSubinterface , te , ret ) ; } return ret ; }
Return all subInterfaces of an interface AND fill - in classToSubinterface map .