code: private static List<Field> getAllFields(Class type) {
  		final List<Field> fields = new ArrayList<>();
  		for (Class<?> c = type; c != null; c = c.getSuperclass()) {
  			fields.addAll(Arrays.asList(c.getDeclaredFields()));
  		}
  		return fields;
  	}
docs: Returns the declared and inherited fields of the specified class.
  
  @param type the class whose fields to list
  @return a list of fields