public abstract static class PropertyNamingStrategy.PropertyNamingStrategyBase extends PropertyNamingStrategy
PropertyNamingStrategy.KebabCaseStrategy, PropertyNamingStrategy.LowerCaseStrategy, PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, PropertyNamingStrategy.PascalCaseStrategy, PropertyNamingStrategy.PropertyNamingStrategyBase, PropertyNamingStrategy.SnakeCaseStrategy, PropertyNamingStrategy.UpperCamelCaseStrategy
CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES, KEBAB_CASE, LOWER_CAMEL_CASE, LOWER_CASE, PASCAL_CASE_TO_CAMEL_CASE, SNAKE_CASE, UPPER_CAMEL_CASE
Constructor and Description |
---|
PropertyNamingStrategyBase() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
nameForConstructorParameter(MapperConfig<?> config,
AnnotatedParameter ctorParam,
java.lang.String defaultName)
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).
|
java.lang.String |
nameForField(MapperConfig<?> config,
AnnotatedField field,
java.lang.String defaultName)
Method called to find external name (name used in JSON) for given logical
POJO property,
as defined by given field.
|
java.lang.String |
nameForGetterMethod(MapperConfig<?> config,
AnnotatedMethod method,
java.lang.String defaultName)
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.
|
java.lang.String |
nameForSetterMethod(MapperConfig<?> config,
AnnotatedMethod method,
java.lang.String defaultName)
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).
|
abstract java.lang.String |
translate(java.lang.String propertyName) |
public java.lang.String nameForField(MapperConfig<?> config, AnnotatedField field, java.lang.String defaultName)
PropertyNamingStrategy
nameForField
in class PropertyNamingStrategy
config
- Configuration in used: either SerializationConfig
or DeserializationConfig
, depending on whether method is called
during serialization or deserializationfield
- Field used to access propertydefaultName
- Default name that would be used for property in absence of custom strategypublic java.lang.String nameForGetterMethod(MapperConfig<?> config, AnnotatedMethod method, java.lang.String defaultName)
PropertyNamingStrategy
nameForGetterMethod
in class PropertyNamingStrategy
config
- Configuration in used: either SerializationConfig
or DeserializationConfig
, depending on whether method is called
during serialization or deserializationmethod
- Method used to access property.defaultName
- Default name that would be used for property in absence of custom strategypublic java.lang.String nameForSetterMethod(MapperConfig<?> config, AnnotatedMethod method, java.lang.String defaultName)
PropertyNamingStrategy
nameForSetterMethod
in class PropertyNamingStrategy
config
- Configuration in used: either SerializationConfig
or DeserializationConfig
, depending on whether method is called
during serialization or deserializationmethod
- Method used to access property.defaultName
- Default name that would be used for property in absence of custom strategypublic java.lang.String nameForConstructorParameter(MapperConfig<?> config, AnnotatedParameter ctorParam, java.lang.String defaultName)
PropertyNamingStrategy
nameForConstructorParameter
in class PropertyNamingStrategy
config
- Configuration in used: either SerializationConfig
or DeserializationConfig
, depending on whether method is called
during serialization or deserializationctorParam
- Constructor parameter used to pass property.defaultName
- Default name that would be used for property in absence of custom strategypublic abstract java.lang.String translate(java.lang.String propertyName)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"