code: public static Predicate<Field> inClass(Class<?> clazz) {
          return field -> field.getDeclaringClass().equals(clazz);
      }
docs: Create a predicate to check that a field is defined in a given class.
  
  @param clazz enclosing type of the field to check
  @return Predicate to check that a field is defined in a given class.