public static class DefaultAccessorNamingStrategy.RecordNaming extends DefaultAccessorNamingStrategy
java.lang.Record types, and in particular find default
accessors for declared record fields.
Current / initial implementation will also recognize additional "normal" getters ("get"-prefix) and is-getters ("is"-prefix and boolean return value) by name.
DefaultAccessorNamingStrategy.BaseNameValidator, DefaultAccessorNamingStrategy.FirstCharBasedValidator, DefaultAccessorNamingStrategy.Provider, DefaultAccessorNamingStrategy.RecordNamingAccessorNamingStrategy.Base| Constructor and Description |
|---|
RecordNaming(MapperConfig<?> config,
AnnotatedClass forClass) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
findNameForRegularGetter(AnnotatedMethod am,
java.lang.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)
|
findNameForIsGetter, findNameForMutator, modifyFieldNamepublic RecordNaming(MapperConfig<?> config, AnnotatedClass forClass)
public java.lang.String findNameForRegularGetter(AnnotatedMethod am, java.lang.String name)
AccessorNamingStrategyNote 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 AccessorNamingStrategy.findNameForIsGetter(com.fasterxml.jackson.databind.introspect.AnnotatedMethod, java.lang.String))
Note that visibility checks are applied separately; strategy does not need to be concerned with that aspect.
findNameForRegularGetter in class DefaultAccessorNamingStrategyam - Method to checkname - Name to check (usually same as AnnotatedMethod.getName()null to indicate
that the name does not conform to expected naming conventionCopyright © 2010 - 2023 Adobe. All Rights Reserved