code: public static List<Field> getSelfAndSuperClassFields(Class<?> clazz) {//YongZ added this method
  		List<Field> fields = new ArrayList<Field>();
  		for (Field field : clazz.getDeclaredFields())
  			fields.add(field);
  
  		Class<?> superclass = clazz.getSuperclass();
  		while (superclass != null) {
  			if (Object.class.equals(superclass)) {
  				break;
  			}
  			for (Field field : superclass.getDeclaredFields())
  				fields.add(field);
  			superclass = superclass.getSuperclass();
  		}
  		return fields;
  	}
docs: Get all fields of a class includes its super class's fields