Class PropertyNamingStrategies.NamingBase
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.PropertyNamingStrategy
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.PropertyNamingStrategies.NamingBase
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PropertyNamingStrategies.KebabCaseStrategy
,PropertyNamingStrategies.LowerCamelCaseStrategy
,PropertyNamingStrategies.LowerCaseStrategy
,PropertyNamingStrategies.LowerDotCaseStrategy
,PropertyNamingStrategies.SnakeCaseStrategy
,PropertyNamingStrategies.UpperCamelCaseStrategy
- Enclosing class:
- PropertyNamingStrategies
Intermediate base class for simple implementations
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.PropertyNamingStrategy
PropertyNamingStrategy.KebabCaseStrategy, PropertyNamingStrategy.LowerCaseStrategy, PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, PropertyNamingStrategy.LowerDotCaseStrategy, PropertyNamingStrategy.PascalCaseStrategy, PropertyNamingStrategy.PropertyNamingStrategyBase, PropertyNamingStrategy.SnakeCaseStrategy, PropertyNamingStrategy.UpperCamelCaseStrategy
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.PropertyNamingStrategy
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionnameForConstructorParameter
(MapperConfig<?> config, AnnotatedParameter ctorParam, 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).nameForField
(MapperConfig<?> config, AnnotatedField field, String defaultName) Method called to find external name (name used in JSON) for given logical POJO property, as defined by given field.nameForGetterMethod
(MapperConfig<?> config, AnnotatedMethod method, 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.nameForSetterMethod
(MapperConfig<?> config, AnnotatedMethod method, 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 String
protected String
translateLowerCaseWithSeparator
(String input, char separator) Helper method to share implementation between snake and dotted case.
-
Constructor Details
-
NamingBase
public NamingBase()
-
-
Method Details
-
nameForField
Description copied from class:PropertyNamingStrategy
Method called to find external name (name used in JSON) for given logical POJO property, as defined by given field.- Overrides:
nameForField
in classPropertyNamingStrategy
- Parameters:
config
- Configuration in used: eitherSerializationConfig
orDeserializationConfig
, 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 strategy- Returns:
- Logical name to use for property that the field represents
-
nameForGetterMethod
public String nameForGetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName) Description copied from class:PropertyNamingStrategy
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)- Overrides:
nameForGetterMethod
in classPropertyNamingStrategy
- Parameters:
config
- Configuration in used: eitherSerializationConfig
orDeserializationConfig
, 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 strategy- Returns:
- Logical name to use for property that the method represents
-
nameForSetterMethod
public String nameForSetterMethod(MapperConfig<?> config, AnnotatedMethod method, String defaultName) Description copied from class:PropertyNamingStrategy
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).- Overrides:
nameForSetterMethod
in classPropertyNamingStrategy
- Parameters:
config
- Configuration in used: eitherSerializationConfig
orDeserializationConfig
, 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 strategy- Returns:
- Logical name to use for property that the method represents
-
nameForConstructorParameter
public String nameForConstructorParameter(MapperConfig<?> config, AnnotatedParameter ctorParam, String defaultName) Description copied from class:PropertyNamingStrategy
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).- Overrides:
nameForConstructorParameter
in classPropertyNamingStrategy
- Parameters:
config
- Configuration in used: eitherSerializationConfig
orDeserializationConfig
, 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 strategy
-
translate
-
translateLowerCaseWithSeparator
Helper method to share implementation between snake and dotted case.
-