如何在推土机中绘制馆藏地图
2022-09-01 20:06:59
我想做这样的事情:
ArrayList<CustomObject> objects = new ArrayList<CustomObject>();
...
DozerBeanMapper MAPPER = new DozerBeanMapper();
...
ArrayList<NewObject> newObjects = MAPPER.map(objects, ...);
若:
<mapping>
<class-a>com.me.CustomObject</class-a>
<class-b>com.me.NewObject</class-b>
<field>
<a>id</a>
<b>id2</b>
</field>
</mapping>
我试过了:
ArrayList<NewObject> holder = new ArrayList<NewObject>();
MAPPER.map(objects, holder);
但持有者对象为空。我也玩弄了改变第二个论点,没有任何运气......