code: public static List<Field> findAllFields(Class<?> type) {
  		List<Field> fields = new LinkedList<>();
  		if (type != null) {
  			addAll(fields, type.getDeclaredFields());
  
  			if (type.getSuperclass() != null) {
  				fields.addAll(findAllFields(type.getSuperclass()));
  			}
  		}
  		return fields;
  	}
docs: Get all fields on given object and look for fields of
  super classes.
  
  @param type Class to inspect.
  @return Fields.