Package org.mapstruct.ap.spi
Class CaseEnumTransformationStrategy
- java.lang.Object
-
- org.mapstruct.ap.spi.CaseEnumTransformationStrategy
-
- All Implemented Interfaces:
EnumTransformationStrategy
public class CaseEnumTransformationStrategy extends java.lang.Object implements EnumTransformationStrategy
Applies case transformation to the source enum- Since:
- 1.5
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCAPITALprivate static java.lang.StringCASE_ENUM_TRANSFORMATION_STRATEGIESprivate static java.lang.StringLOWERprivate static java.lang.StringUPPER
-
Constructor Summary
Constructors Constructor Description CaseEnumTransformationStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Stringcapitalize(java.lang.String value)java.lang.StringgetStrategyName()The name of the strategy.java.lang.Stringtransform(java.lang.String value, java.lang.String configuration)Transform the given value by using the givenconfiguration.private static java.lang.StringupperCaseFirst(java.lang.String value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mapstruct.ap.spi.EnumTransformationStrategy
init
-
-
-
-
Field Detail
-
UPPER
private static final java.lang.String UPPER
- See Also:
- Constant Field Values
-
LOWER
private static final java.lang.String LOWER
- See Also:
- Constant Field Values
-
CAPITAL
private static final java.lang.String CAPITAL
- See Also:
- Constant Field Values
-
CASE_ENUM_TRANSFORMATION_STRATEGIES
private static final java.lang.String CASE_ENUM_TRANSFORMATION_STRATEGIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStrategyName
public java.lang.String getStrategyName()
Description copied from interface:EnumTransformationStrategyThe name of the strategy.- Specified by:
getStrategyNamein interfaceEnumTransformationStrategy- Returns:
- the name of the strategy, never
null
-
transform
public java.lang.String transform(java.lang.String value, java.lang.String configuration)Description copied from interface:EnumTransformationStrategyTransform the given value by using the givenconfiguration.- Specified by:
transformin interfaceEnumTransformationStrategy- 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
-
capitalize
private static java.lang.String capitalize(java.lang.String value)
-
upperCaseFirst
private static java.lang.String upperCaseFirst(java.lang.String value)
-
-