| Modifier and Type | Class and Description |
|---|---|
| public static class | AccessorNamingStrategy.
Helper class that implements all abstract methods with dummy implementations. |
| public abstract static class | AccessorNamingStrategy.
Interface for provider (factory) for constructing |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract String | Returns: Implied property name for is-getter method, if match;null to indicate
that the name does not conform to expected naming conventionMethod to check method, String Name to check (usually same as name)AnnotatedMethod#getName()Method called to find whether given method would be considered an "is-getter" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, has return value) but NOT the specific limitation that return type should be of boolean type -- implementation should apply latter check, if so desired (some languages may use different criteria). |
| public abstract String | Returns: Implied property name for mutator method, if match;null
to indicate that the name does not conform to expected naming conventionMethod to check method, String Name to check (usually same as name)AnnotatedMethod#getName()Method called to find whether given method would be considered a "mutator" (usually setter, but for builders "with-method" or similar) in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (exactly one parameter) by caller. |
| public abstract String | Returns: Implied property name for getter method, if match;null to indicate
that the name does not conform to expected naming conventionMethod to check method, String Name to check (usually same as name)AnnotatedMethod#getName()Method called to find whether given method would be considered a "regular" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, does have a return value) by caller. |
| public abstract String | Returns: Implied property name matching given field (often field name as-is) ornull
to indicate that the name does not conform to expected naming convention
(and will not be considered for property access)Field to check field, String Name to check (usually same as name)AnnotatedField#getName()Method called to find the name of logical property that given field should be associated with, if any. |
| AccessorNamingStrategy | back to summary |
|---|---|
| public AccessorNamingStrategy() | |
| findNameForIsGetter | back to summary |
|---|---|
| public abstract String findNameForIsGetter(AnnotatedMethod method, String name) Method called to find whether given method would be considered an "is-getter" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, has return value) but NOT the specific limitation that return type should be of boolean type -- implementation should apply latter check, if so desired (some languages may use different criteria). It is also possible that some implementations allow different return types than boolean types. Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
| findNameForMutator | back to summary |
|---|---|
| public abstract String findNameForMutator(AnnotatedMethod method, String name) Method called to find whether given method would be considered a "mutator" (usually setter, but for builders "with-method" or similar) in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (exactly one parameter) by caller. Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
| findNameForRegularGetter | back to summary |
|---|---|
| public abstract String findNameForRegularGetter(AnnotatedMethod method, String name) Method called to find whether given method would be considered a "regular" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, does have a return value) by caller.
Note that this method MAY be called for potential "is-getter" methods too
(before Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
| modifyFieldName | back to summary |
|---|---|
| public abstract String modifyFieldName(AnnotatedField field, String name) Method called to find the name of logical property that given field should be associated with, if any. Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
null
null
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | findNameForIsGetter(AnnotatedMethod
Method to check method, String Name to check (usually same as name)AnnotatedMethod#getName()Implements abstract com. Method called to find whether given method would be considered an "is-getter" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, has return value) but NOT the specific limitation that return type should be of boolean type -- implementation should apply latter check, if so desired (some languages may use different criteria). |
| public String | findNameForMutator(AnnotatedMethod
Method to check method, String Name to check (usually same as name)AnnotatedMethod#getName()Implements abstract com. Method called to find whether given method would be considered a "mutator" (usually setter, but for builders "with-method" or similar) in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (exactly one parameter) by caller. |
| public String | findNameForRegularGetter(AnnotatedMethod
Method to check method, String Name to check (usually same as name)AnnotatedMethod#getName()Implements abstract com. Method called to find whether given method would be considered a "regular" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, does have a return value) by caller. |
| public String | modifyFieldName(AnnotatedField
Field to check field, String Name to check (usually same as name)AnnotatedField#getName()Implements abstract com. Method called to find the name of logical property that given field should be associated with, if any. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Base | back to summary |
|---|---|
| public Base() | |
| findNameForIsGetter | back to summary |
|---|---|
| public String findNameForIsGetter(AnnotatedMethod method, String name) Implements abstract com. Doc from com. Method called to find whether given method would be considered an "is-getter" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, has return value) but NOT the specific limitation that return type should be of boolean type -- implementation should apply latter check, if so desired (some languages may use different criteria). It is also possible that some implementations allow different return types than boolean types. Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
| findNameForMutator | back to summary |
|---|---|
| public String findNameForMutator(AnnotatedMethod method, String name) Implements abstract com. Doc from com. Method called to find whether given method would be considered a "mutator" (usually setter, but for builders "with-method" or similar) in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (exactly one parameter) by caller. Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
| findNameForRegularGetter | back to summary |
|---|---|
| public String findNameForRegularGetter(AnnotatedMethod method, String name) Implements abstract com. Doc from com. Method called to find whether given method would be considered a "regular" getter method in context of type introspected, and if so, what is the logical property it is associated with (which in turn suggest external name for property) Note that signature acceptability has already been checked (no arguments, does have a return value) by caller.
Note that this method MAY be called for potential "is-getter" methods too
(before Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
| modifyFieldName | back to summary |
|---|---|
| public String modifyFieldName(AnnotatedField field, String name) Implements abstract com. Doc from com. Method called to find the name of logical property that given field should be associated with, if any. Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
| |
AccessorNamingStrategy
for given type of deserialization target
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract AccessorNamingStrategy | Returns: Naming strategy instance to useCurrent mapper configuration config, AnnotatedClass Information about builder type builderClass, BeanDescription Information about the eventual target (value) type valueTypeDesc)Factory method for creating strategy instance for POJOs that are deserialized using Builder type: in this case eventual target (value) type is different from type of "builder" object that is used by databinding to accumulate state. |
| public abstract AccessorNamingStrategy | Returns: Naming strategy instance to useCurrent mapper configuration config, AnnotatedClass Information about value type valueClass)Factory method for creating strategy instance for a "regular" POJO, called if none of the other factory methods is applicable. |
| public abstract AccessorNamingStrategy | Returns: Naming strategy instance to useCurrent mapper configuration config, AnnotatedClass Information about value type (of type recordClass)java.lang.Record)Factory method for creating strategy instance for special |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Provider | back to summary |
|---|---|
| public Provider() | |
| forBuilder | back to summary |
|---|---|
| public abstract AccessorNamingStrategy forBuilder(MapperConfig<?> config, AnnotatedClass builderClass, BeanDescription valueTypeDesc) Factory method for creating strategy instance for POJOs that are deserialized using Builder type: in this case eventual target (value) type is different from type of "builder" object that is used by databinding to accumulate state.
| |
| forPOJO | back to summary |
|---|---|
| public abstract AccessorNamingStrategy forPOJO(MapperConfig<?> config, AnnotatedClass valueClass) Factory method for creating strategy instance for a "regular" POJO, called if none of the other factory methods is applicable.
| |
| forRecord | back to summary |
|---|---|
| public abstract AccessorNamingStrategy forRecord(MapperConfig<?> config, AnnotatedClass recordClass) Factory method for creating strategy instance for special
| |