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