public static class PropertyNamingStrategies.UpperCamelCaseStrategy extends PropertyNamingStrategies.NamingBase
PropertyNamingStrategy
that translates typical camelCase Java
property names to PascalCase JSON element names (i.e., with a capital
first letter). In particular, the following translations are applied by
this PropertyNamingStrategy.
PropertyNamingStrategy.KebabCaseStrategy, PropertyNamingStrategy.LowerCaseStrategy, PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, PropertyNamingStrategy.LowerDotCaseStrategy, PropertyNamingStrategy.PascalCaseStrategy, PropertyNamingStrategy.PropertyNamingStrategyBase, PropertyNamingStrategy.SnakeCaseStrategy, PropertyNamingStrategy.UpperCamelCaseStrategy
Modifier and Type | Field and Description |
---|---|
static PropertyNamingStrategies.UpperCamelCaseStrategy |
INSTANCE |
CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES, KEBAB_CASE, LOWER_CAMEL_CASE, LOWER_CASE, LOWER_DOT_CASE, PASCAL_CASE_TO_CAMEL_CASE, SNAKE_CASE, UPPER_CAMEL_CASE
Constructor and Description |
---|
UpperCamelCaseStrategy() |
Modifier and Type | Method and Description |
---|---|
String |
translate(String input)
Converts camelCase to PascalCase
For example, "userName" would be converted to
"UserName".
|
nameForConstructorParameter, nameForField, nameForGetterMethod, nameForSetterMethod, translateLowerCaseWithSeparator
public static final PropertyNamingStrategies.UpperCamelCaseStrategy INSTANCE
public String translate(String input)
translate
in class PropertyNamingStrategies.NamingBase
input
- formatted as camelCase stringCopyright © 2008–2023 FasterXML. All rights reserved.