Package org.codehaus.jackson.map
Class PropertyNamingStrategy.PropertyNamingStrategyBase
- java.lang.Object
-
- org.codehaus.jackson.map.PropertyNamingStrategy
-
- org.codehaus.jackson.map.PropertyNamingStrategy.PropertyNamingStrategyBase
-
- Direct Known Subclasses:
PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy
- Enclosing class:
- PropertyNamingStrategy
public abstract static class PropertyNamingStrategy.PropertyNamingStrategyBase extends PropertyNamingStrategy
- Since:
- 1.9
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.codehaus.jackson.map.PropertyNamingStrategy
PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, PropertyNamingStrategy.PropertyNamingStrategyBase
-
-
Field Summary
-
Fields inherited from class org.codehaus.jackson.map.PropertyNamingStrategy
CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES
-
-
Constructor Summary
Constructors Constructor Description PropertyNamingStrategyBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringnameForConstructorParameter(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).StringnameForField(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.StringnameForGetterMethod(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.StringnameForSetterMethod(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 Stringtranslate(String propertyName)
-
-
-
Method Detail
-
nameForField
public String nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName)
Description copied from class:PropertyNamingStrategyMethod called to find external name (name used in JSON) for given logical POJO property, as defined by given field.- Overrides:
nameForFieldin classPropertyNamingStrategy- Parameters:
config- Configuration in used: eitherSerializationConfigorDeserializationConfig, 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:PropertyNamingStrategyMethod 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:
nameForGetterMethodin classPropertyNamingStrategy- Parameters:
config- Configuration in used: eitherSerializationConfigorDeserializationConfig, 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:PropertyNamingStrategyMethod 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:
nameForSetterMethodin classPropertyNamingStrategy- Parameters:
config- Configuration in used: eitherSerializationConfigorDeserializationConfig, 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:PropertyNamingStrategyMethod 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:
nameForConstructorParameterin classPropertyNamingStrategy- Parameters:
config- Configuration in used: eitherSerializationConfigorDeserializationConfig, 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
-
-