(note: inspired by #1033)
Although Jackson tries to figure out reasonable rules for precedence of setter to use, in case of overlap, it is not possible to resolve all kinds of application/usage-specific cases. So to allow plugging in custom handling, let's add a mechanism overridable via AnnotationIntrospector that makes it possible to resolve at least some of most common cases.
In addition, JacksonAnnotationIntrospector should implement very basic heuristics, where:
- Primitive type has higher precedence than non-primitive
- For other types,
java.lang.String has precedence over other non-primitive types.
This logic is overridable.