code: public static Set<Field> getFields(Class<?> target, FieldFilter filter) {
          Class<?> clazz = target;
          Set<Field> fields = getDeclaredFields(clazz, filter);
          while((clazz = clazz.getSuperclass()) != null) {    
              fields.addAll(getDeclaredFields(clazz, filter));
          }
          return fields;
      }
docs: Returns a set of all fields matching the supplied filter
  declared in the target class or any of its super classes.
  
  @param filter    Filter to use.
  
  @return All matching fields declared by the target class.