PropertyNamingStrategy implementations
and singleton instances.
| Modifier and Type | Class and Description |
|---|---|
| public static class | PropertyNamingStrategies.
Naming strategy similar to |
| public static class | PropertyNamingStrategies.
"No-operation" strategy that is equivalent to not specifying any strategy: will simply return suggested standard bean naming as-is. |
| public static class | PropertyNamingStrategies.
Simple strategy where external name simply only uses lower-case characters, and no separators. |
| public static class | PropertyNamingStrategies.
Naming strategy similar to |
| public abstract static class | PropertyNamingStrategies.
Intermediate base class for simple implementations |
| public static class | PropertyNamingStrategies.
A |
| public static class | PropertyNamingStrategies.
A |
| public static class | PropertyNamingStrategies.
A |
| Modifier and Type | Field and Description |
|---|---|
| public static final PropertyNamingStrategy | KEBAB_CASE
Naming convention used in languages like Lisp, where words are in lower-case letters, separated by hyphens. |
| public static final PropertyNamingStrategy | LOWER_CAMEL_CASE
Naming convention used in Java, where words other than first are capitalized and no separator is used between words. |
| public static final PropertyNamingStrategy | LOWER_CASE
Naming convention in which all words of the logical name are in lower case, and no separator is used between words. |
| public static final PropertyNamingStrategy | LOWER_DOT_CASE
Naming convention widely used as configuration properties name, where words are in lower-case letters, separated by dots. |
| private static final long | |
| public static final PropertyNamingStrategy | SNAKE_CASE
Naming convention used in languages like C, where words are in lower-case letters, separated by underscores. |
| public static final PropertyNamingStrategy | UPPER_CAMEL_CASE
Naming convention used in languages like Pascal, where all words are capitalized and no separator is used between words. |
| public static final PropertyNamingStrategy | UPPER_SNAKE_CASE
Naming convention in which the words are in upper-case letters, separated by underscores. |
| Access | Constructor and Description |
|---|---|
| public |
| KEBAB_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy KEBAB_CASE Naming convention used in languages like Lisp, where words are in lower-case
letters, separated by hyphens.
See Example external property names would be "number-value", "naming-strategy", "the-definite-proof". | |
| LOWER_CAMEL_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy LOWER_CAMEL_CASE Naming convention used in Java, where words other than first are capitalized and no separator is used between words. Since this is the native Java naming convention, naming strategy will not do any transformation between names in data (JSON) and POJOS. Example external property names would be "numberValue", "namingStrategy", "theDefiniteProof". | |
| LOWER_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy LOWER_CASE Naming convention in which all words of the logical name are in lower case, and
no separator is used between words.
See Example external property names would be "numbervalue", "namingstrategy", "thedefiniteproof". | |
| LOWER_DOT_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy LOWER_DOT_CASE Naming convention widely used as configuration properties name, where words are in
lower-case letters, separated by dots.
See Example external property names would be "number.value", "naming.strategy", "the.definite.proof". | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SNAKE_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy SNAKE_CASE Naming convention used in languages like C, where words are in lower-case
letters, separated by underscores.
See Example external property names would be "number_value", "naming_strategy", "the_definite_proof". | |
| UPPER_CAMEL_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy UPPER_CAMEL_CASE Naming convention used in languages like Pascal, where all words are capitalized
and no separator is used between words.
See Example external property names would be "NumberValue", "NamingStrategy", "TheDefiniteProof". | |
| UPPER_SNAKE_CASE | back to summary |
|---|---|
| public static final PropertyNamingStrategy UPPER_SNAKE_CASE Naming convention in which the words are in upper-case letters, separated by underscores.
See | |
| PropertyNamingStrategies | back to summary |
|---|---|
| public PropertyNamingStrategies() | |
PropertyNamingStrategies.SnakeCaseStrategy ,
but instead of underscores
as separators, uses hyphens. Naming convention traditionally used for languages
like Lisp.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | translate(String input)
Implements abstract tools.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| KebabCaseStrategy | back to summary |
|---|---|
| public KebabCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Implements abstract tools.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | translate(String input)
Implements abstract tools.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| LowerCamelCaseStrategy | back to summary |
|---|---|
| public LowerCamelCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Implements abstract tools.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | translate(String input)
Implements abstract tools.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| LowerCaseStrategy | back to summary |
|---|---|
| public LowerCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Implements abstract tools.
| |
PropertyNamingStrategies.KebabCaseStrategy ,
but instead of hyphens
as separators, uses dots. Naming convention widely used as configuration properties name.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | translate(String input)
Implements abstract tools.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| LowerDotCaseStrategy | back to summary |
|---|---|
| public LowerDotCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Implements abstract tools.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | nameForConstructorParameter(MapperConfig<?> config, AnnotatedParameter ctorParam, String defaultName)
Overrides tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given constructor parameter; typically called when building a deserializer (but not necessarily only then). |
| public String | nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName)
Overrides tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given field. |
| public String | nameForGetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName)
Overrides tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given getter method; typically called when building a serializer. |
| public String | nameForSetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName)
Overrides tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given setter method; typically called when building a deserializer (but not necessarily only then). |
| protected abstract String |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| NamingBase | back to summary |
|---|---|
| public NamingBase() | |
| nameForConstructorParameter | back to summary |
|---|---|
| public String nameForConstructorParameter(MapperConfig<?> config, AnnotatedParameter ctorParam, String defaultName) Overrides tools. Doc from tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given constructor parameter; typically called when building a deserializer (but not necessarily only then).
| |
| nameForField | back to summary |
|---|---|
| public String nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName) Overrides tools. Doc from tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given field.
| |
| nameForGetterMethod | back to summary |
|---|---|
| public String nameForGetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName) Overrides tools. Doc from tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given getter method; typically called when building a serializer. (but not always -- when using "getter-as-setter", may be called during deserialization)
| |
| nameForSetterMethod | back to summary |
|---|---|
| public String nameForSetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName) Overrides tools. Doc from tools. Method called to find external name (name used in JSON) for given logical POJO property, as defined by given setter method; typically called when building a deserializer (but not necessarily only then).
| |
| translate | back to summary |
|---|---|
| protected abstract String translate(String propertyName) | |
PropertyNamingStrategy that translates typical camel case Java
property names to lower case JSON element names, separated by
underscores. This implementation is somewhat lenient, in that it
provides some additional translations beyond strictly translating from
camel case only. In particular, the following translations are applied
by this PropertyNamingStrategy.
These rules result in the following additional example translations from Java property names to JSON element names.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | translate(String input)
Implements abstract tools.
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| SnakeCaseStrategy | back to summary |
|---|---|
| public SnakeCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Implements abstract tools.
| |
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.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | Returns: input converted to PascalCase formatformatted as camelCase string input)Implements abstract tools. Converts camelCase to PascalCase For example, "userName" would be converted to "UserName". |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| UpperCamelCaseStrategy | back to summary |
|---|---|
| public UpperCamelCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Implements abstract tools. Converts camelCase to PascalCase For example, "userName" would be converted to "UserName". | |
PropertyNamingStrategy that translates an input to the equivalent upper case snake
case. The class extends PropertyNamingStrategies.SnakeCaseStrategy to retain the
snake case conversion functionality offered by the strategy.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| UpperSnakeCaseStrategy | back to summary |
|---|---|
| public UpperSnakeCaseStrategy() | |
| translate | back to summary |
|---|---|
| protected String translate(String input) Overrides tools.
| |