Android-CleanArchitecture icon indicating copy to clipboard operation
Android-CleanArchitecture copied to clipboard

Is there a fast way(or Android Studio plugin) to write mapper class?

Open tmac1999 opened this issue 7 years ago • 2 comments

If a DTO bean has many fields,then write a mapper class could be a huge burden for me,Specially transform a one-layer(only DTO bean) project to two-layer (DTO bean-VO bean)project.I want maintain the exist DTO field to VO and only the new and changed field will need a mapper.

So Is there a fast way(or Android Studio plugin) to write mapper class?

tmac1999 avatar Mar 22 '18 09:03 tmac1999

I have considered BeanUtils.copyProperties,but it`s a little bit hard to use in Android Framework.

tmac1999 avatar Mar 22 '18 09:03 tmac1999

Try http://mapstruct.org. I have successfully use it in my project.

travisdachi avatar Mar 29 '18 03:03 travisdachi