mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
Add a new custom EnumTransformationStrategy SPI which can be used for providing custom way of name based mapping for enums. Add 4 out of the box transformation strategies: * prefix - add a prefix to the name based enum mapping * stripPrefix - remove a prefix from the name based enum mapping * suffix - add a suffix to the name based enum mapping * stripSuffix - remove a suffix from the name based enum mapping This can be achieved by using the new `EnumMapping` e.g. Add suffix `_TYPE` to all enums: `@EnumMapping(nameTransformationStrategy = "suffix", configuration = "_TYPE")` With this it would be possible to achieve what is needed in #796, #1220, #1789.