public static void getAllInterfaces ( List allIfaces , Class c ) { while ( c != null ) { Class [ ] ifaces = c . getInterfaces ( ) ; for ( int n = 0 ; n < ifaces . length ; n ++ ) { allIfaces . add ( ifaces [ n ] ) ; } c = c . getSuperclass ( ) ; } }
Populates a list with all the interfaces implemented by the argument class c and all its superclasses .