Class EnumNamingStrategies.DelegatingEnumNamingStrategy
java.lang.Object
tools.jackson.databind.EnumNamingStrategies.DelegatingEnumNamingStrategy
- All Implemented Interfaces:
EnumNamingStrategy
- Direct Known Subclasses:
EnumNamingStrategies.KebabCaseStrategy, EnumNamingStrategies.LowerCamelCaseStrategy, EnumNamingStrategies.LowerCaseStrategy, EnumNamingStrategies.LowerDotCaseStrategy, EnumNamingStrategies.SnakeCaseStrategy, EnumNamingStrategies.UpperCamelCaseStrategy, EnumNamingStrategies.UpperSnakeCaseStrategy
- Enclosing class:
EnumNamingStrategies
public abstract static class EnumNamingStrategies.DelegatingEnumNamingStrategy
extends Object
implements EnumNamingStrategy
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionconvertEnumToExternalName(MapperConfig<?> config, AnnotatedClass cls, String enumName) Translates the givenenumNameinto an external property name according to the implementation of thisEnumNamingStrategy.private static intnextIndexOfUnderscore(CharSequence sequence, int start) private static StringnormalizeWord(String word) Converts the first letter of the word to uppercase and the rest of the word to lowercase.protected static StringtoBeanName(String enumName) Normalizes the enum name to lower camel case in order to be further processed by a NamingStrategies
-
Field Details
-
strategy
-
-
Constructor Details
-
DelegatingEnumNamingStrategy
-
-
Method Details
-
convertEnumToExternalName
public String convertEnumToExternalName(MapperConfig<?> config, AnnotatedClass cls, String enumName) Description copied from interface:EnumNamingStrategyTranslates the givenenumNameinto an external property name according to the implementation of thisEnumNamingStrategy.- Specified by:
convertEnumToExternalNamein interfaceEnumNamingStrategy- Parameters:
config- the mapper configurationcls- the Enum classenumName- the name of the enum value to translate- Returns:
- the external property name that corresponds to the given
enumNameaccording to the implementation of thisEnumNamingStrategy.
-
toBeanName
-
nextIndexOfUnderscore
-
normalizeWord
-