mapDefault method
Maps the default value with the mapper
to a new instance of T
.
The main use case is deserializing data. In that case, the default value is simply ignored.
Implementation
T mapDefault(Mapper mapper) {
return map(mapper, newInstance());
}