Package org.mapstruct.ap.spi
Interface EnumTransformationStrategy
- All Known Implementing Classes:
CaseEnumTransformationStrategy,PrefixEnumTransformationStrategy,StripPrefixEnumTransformationStrategy,StripSuffixEnumTransformationStrategy,SuffixEnumTransformationStrategy
@Experimental("This SPI can have its signature changed in subsequent releases")
public interface EnumTransformationStrategy
A service provider interface for transforming name based value mappings.
- Since:
- 1.4
- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptionThe name of the strategy.default voidinit(MapStructProcessingEnvironment processingEnvironment) Initializes the enum transformation strategy with the MapStruct processing environment.Transform the given value by using the givenconfiguration.
-
Method Details
-
init
Initializes the enum transformation strategy with the MapStruct processing environment.- Parameters:
processingEnvironment- environment for facilities
-
getStrategyName
String getStrategyName()The name of the strategy.- Returns:
- the name of the strategy, never
null
-
transform
Transform the given value by using the givenconfiguration.- Parameters:
value- the value that should be transformedconfiguration- the configuration that should be used for the transformation- Returns:
- the transformed value after applying the configuration
-