jsonschema2pojo icon indicating copy to clipboard operation
jsonschema2pojo copied to clipboard

Deep cloning option

Open monksy opened this issue 9 years ago • 2 comments

Could we get the option within the generation to have this tool generate a POJO that is able to implement the clone method and to make deep copies of it's self?

monksy avatar Jul 29 '14 23:07 monksy

Thanks for raising this @monksy, it sounds like a very useful addition. There's probably quite a bit of work here, but no blockers that I can think of. The clone methods should be able to simply enumerate all private fields and either clone them (in the case of an object) or set them directly (in the case of a primitive).

joelittlejohn avatar Jul 30 '14 12:07 joelittlejohn

Is this still on the roadmap for jsonschema2pojo?

mithmatt avatar Feb 20 '22 01:02 mithmatt

Is copy constructor functionality still on roadmap for jsonschema2pojo?

ayushjack avatar Dec 27 '22 05:12 ayushjack