public static boolean hasInterface ( Class < ? > has , Class < ? > in ) { if ( has . equals ( in ) ) { return true ; } boolean match = false ; for ( Class < ? > intrface : in . getInterfaces ( ) ) { if ( intrface . getInterfaces ( ) . length > 0 ) { match = hasInterface ( has , intrface ) ; } else { match = intrface . equals ( has ) ; } if ( match ) { return true ; } } return false ; }
Checks for interface has in class in .