Unfortunately handling of TypeIdResolver is quite strongly coupled
with that of `TypeResolverBuilder`, and your best route would probably
be via annotation introspector. Although I actually like your approach
above: did not know it would actually work (I spent some time back in
the day trying to figure out if implementing annotation types via
non-annotation declaration works... didn't think it did).
Anyway, method to override would be
public TypeResolverBuilder<?> findTypeResolver(MapperConfig<?> config,
AnnotatedClass ac, JavaType baseType) { }
and you should be able to just use base implementation, but call
`init(...)` on builder instance if one found, to override default
resolver.
This is not optimal of course.
One more existing facility is method
public ObjectMapper setDefaultTyping(TypeResolverBuilder<?> typer) { ... }
in ObjectMapper. This does let you control all type id aspects,
including type id resolution, but is quite a bit of work.
-+ Tatu +-
> --
> You received this message because you are subscribed to the Google Groups
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
jackson-user...@googlegroups.com.
> To post to this group, send email to
jackso...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.