private void collectClassesFromInterfaceAndSubInterfaces(Collection<ImmutableClassType> results,ImmutableInterfaceType interfaceType){
  for (  ImmutableClassType classType : interfaceType.getImmutableRealizingClasses()) {
    if (classType.isInitialized()) {
      results.add(classType);
    }
    collectClassesFromSubClasses(results,classType);
  }
  for (  ImmutableInterfaceType superInterfaceType : interfaceType.getImmutableSubInterfaces()) {
    collectClassesFromInterfaceAndSubInterfaces(results,superInterfaceType);
  }
}

private void collectClassesFromInterfaceAndSubInterfaces ( Collection < ImmutableClassType > results , ImmutableInterfaceType interfaceType ) { for ( ImmutableClassType classType : interfaceType . getImmutableRealizingClasses ( ) ) { if ( classType . isInitialized ( ) ) { results . add ( classType ) ; } collectClassesFromSubClasses ( results , classType ) ; } for ( ImmutableInterfaceType superInterfaceType : interfaceType . getImmutableSubInterfaces ( ) ) { collectClassesFromInterfaceAndSubInterfaces ( results , superInterfaceType ) ; } }
collects all realizing classes that implement given interface or any of its sub - interfaces and adds them to the given results list . this method is recursive .
