DataModelTreeVo.builder().label(raw.getLabel()).name(raw.getName()).value(raw.getValue()) .describe(raw.getDescribe()).isArr(raw.getIsArr()).isExtend(raw.getIsExtend()) .enumName(raw.getEnumName()).type(raw.getType()).isUse(raw.getIsUse()) .children(Optional.ofNullable(raw.getProperties()) .map(properties -> properties.stream() .map(VariableDataModelBizImpl::form).collect(Collectors.toList()) ).orElse(null) ).build(); } 如果raw的properties属性不为空,就会将其转换为一个流,并通过map操作将每个属性转换为相应的DataModelTreeVo对象,最后使用collect操作将所有子节点收集到列表中。 最后,使用build方法构建并返回了一个完整的DataModelTreeVo对象。