Skip to content

Immutable Objects

Alessandro Vurro edited this page Oct 6, 2016 · 7 revisions

under construction

What changes if you have a target object that is not instantiable? Nothing!
Since 1.6.1.RC1 version you can pass the immutable object to the getDestination method using the enrichment signature:

ImmutableObj obj = ....
...
obj = mapper.getDestination(obj, source);
...

Nothing is changed from the developer's point of view, empty constructor is not longer mandatory.
In addition to this, there is the possibility to delegate the management to JMapper through destinationFactory method:

Clone this wiki locally