public static Predicate < Class < ? > > hasModifiers ( final Integer modifiers ) { return clazz -> ( modifiers & clazz . getModifiers ( ) ) == modifiers ; }
Create a predicate to check that a type has a given set of modifiers .