public static Set < Class < ? > > getDeclaredInterfaces ( Class < ? > clazz , ClassFilter filter ) { Set < Class < ? > > interfacesFound = new HashSet < Class < ? > > ( ) ; Class < ? > [ ] interfaces = clazz . getInterfaces ( ) ; for ( Class < ? > interfaceClass : interfaces ) { if ( filter . passFilter ( interfaceClass ) ) { interfacesFound . add ( interfaceClass ) ; } } return interfacesFound ; }
Returns a set of interfaces that the from clazz that passes the supplied filter .