a object to object mapper compatible on Android

和自甴很熟 提交于 2021-02-10 11:51:50

问题


I'm looking for an object to object mapper for Android. It's all about an automation of Java Bean to Java Bean copy so that each field with a name xyz will match a field xyz in another class. I've tried already each of those in Java http://www.javacodegeeks.com/2013/10/java-object-to-object-mapper.html

But none is Android compilable, do you have any ideas what to try?


回答1:


I have been using this , a mapper for pojos

https://github.com/txusballesteros/android-transformer




回答2:


I used http://modelmapper.org in some projects. Quite flexible. See the getting-started for more info. Just add this in your build.gradle:

compile 'org.modelmapper:modelmapper:0.7.4'



来源:https://stackoverflow.com/questions/30784031/a-object-to-object-mapper-compatible-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!