code: private static ArrayList<Field> getFieldHierarchy(Class<?> cls) {
  		ArrayList<Field> list = new ArrayList<Field>();
  		for (Class<?> cl : buildClassHierarchy(cls)) {
  			list.addAll(Arrays.asList(cl.getDeclaredFields()));
  		}
  		return list;
  	}
docs: Utils