jnemecz
jnemecz

Reputation: 3628

MapStruct and parametrized constructor?

Is there support in MapStruct for parametrized constructors?

I found in many posts from 2015 that this feature will be implemented in 1.1 release. Now I'm using 1.1.0.Final but I'm not able to find out in doc how to map target object that requires parametrized constructor.

Is this feature implemented?

Upvotes: 3

Views: 21907

Answers (2)

lrkwz
lrkwz

Reputation: 6533

Support for parametrized constructors is available since version 1.4 as described in chapter "Object Factories".

Upvotes: 5

Gunnar
Gunnar

Reputation: 19020

No, there is no support for other constructors than parameterless (default) constructors currently. There is issue #73 for tracking it. It's high on our wish list and I hope it will be done soon, but it's too early to tell when it will be.

Upvotes: 0

Related Questions