Package com.fasterxml.jackson.databind
Class EnumNamingStrategies.DelegatingEnumNamingStrategy
- java.lang.Object
-
- com.fasterxml.jackson.databind.EnumNamingStrategies.DelegatingEnumNamingStrategy
-
- All Implemented Interfaces:
EnumNamingStrategy
- Direct Known Subclasses:
EnumNamingStrategies.CamelCaseStrategy,EnumNamingStrategies.KebabCaseStrategy,EnumNamingStrategies.LowerCamelCaseStrategy,EnumNamingStrategies.LowerCaseStrategy,EnumNamingStrategies.LowerDotCaseStrategy,EnumNamingStrategies.SnakeCaseStrategy,EnumNamingStrategies.UpperCamelCaseStrategy,EnumNamingStrategies.UpperSnakeCaseStrategy
- Enclosing class:
- EnumNamingStrategies
public abstract static class EnumNamingStrategies.DelegatingEnumNamingStrategy extends java.lang.Object implements EnumNamingStrategy
-
-
Field Summary
Fields Modifier and Type Field Description private NamingStrategyImplsstrategy
-
Constructor Summary
Constructors Modifier Constructor Description protectedDelegatingEnumNamingStrategy(NamingStrategyImpls strategy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringconvertEnumToExternalName(java.lang.String enumName)Translates the givenenumNameinto an external property name according to the implementation of thisEnumNamingStrategy.private static intnextIndexOfUnderscore(java.lang.CharSequence sequence, int start)private static java.lang.StringnormalizeWord(java.lang.String word)Converts the first letter of the word to uppercase and the rest of the word to lowercase.protected static java.lang.StringtoBeanName(java.lang.String enumName)Normalizes the enum name to lower camel case in order to be further processed by a NamingStrategies
-
-
-
Field Detail
-
strategy
private final NamingStrategyImpls strategy
-
-
Constructor Detail
-
DelegatingEnumNamingStrategy
protected DelegatingEnumNamingStrategy(NamingStrategyImpls strategy)
-
-
Method Detail
-
convertEnumToExternalName
public java.lang.String convertEnumToExternalName(java.lang.String enumName)
Description copied from interface:EnumNamingStrategyTranslates the givenenumNameinto an external property name according to the implementation of thisEnumNamingStrategy.- Specified by:
convertEnumToExternalNamein interfaceEnumNamingStrategy- Parameters:
enumName- 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
protected static java.lang.String toBeanName(java.lang.String enumName)
Normalizes the enum name to lower camel case in order to be further processed by a NamingStrategies- Parameters:
enumName- the enum name to be normalized- Returns:
- the normalized enum name
-
nextIndexOfUnderscore
private static int nextIndexOfUnderscore(java.lang.CharSequence sequence, int start)
-
normalizeWord
private static java.lang.String normalizeWord(java.lang.String word)
Converts the first letter of the word to uppercase and the rest of the word to lowercase.
-
-