public SortedSet < TypeElement > implementingClasses ( TypeElement typeElement ) { SortedSet < TypeElement > result = get ( implementingClasses , typeElement ) ; SortedSet < TypeElement > intfcs = allSubClasses ( typeElement , false ) ; // If class x implements a subinterface of typeElement, then it follows // that class x implements typeElement. Iterator < TypeElement > subInterfacesIter = intfcs . iterator ( ) ; while ( subInterfacesIter . hasNext ( ) ) { Iterator < TypeElement > implementingClassesIter = implementingClasses ( subInterfacesIter . next ( ) ) . iterator ( ) ; while ( implementingClassesIter . hasNext ( ) ) { TypeElement c = implementingClassesIter . next ( ) ; if ( ! result . contains ( c ) ) { result . add ( c ) ; } } } return result ; }
Return the set of classes which implement the interface passed .