List<Object> ->> List<Bean>
public static <T> List<T> castList(Object obj, Class<T> clazz) { List<T> result = new ArrayList<>(); if (obj instanceof List<?>) { for (Object o : (List<?>) obj) { if (o != null) { result.add(clazz.cast(o)); } } return result; } return null; }eg:
List<Object> deviceList =new ArrayList<>();
List<OldMan> list = castList(deviceList, OldMan.class);
List<Map<String,Object> list ->> List<OldMan>
eg: List<OldMan> realTimeList= JSON.parseObject(JSON.toJSONString(list), new TypeReference<List<OldMan>>() {});