this.pluginRegistry = pluginRegistry;
}
@Override
public TypeResolverBuilder<?> findTypeResolver(MapperConfig<?> config, AnnotatedClass ac, JavaType baseType) {
Pluggable pluggable = ac.getAnnotation(Pluggable.class);
if (pluggable != null) {
PluginMap pluginMap = pluginRegistry.byCategory().get(pluggable.value());
if (pluginMap != null) {
return new CodecTypeResolverBuilder(pluginMap, config.getTypeFactory(), pluginRegistry);
} else {
log.warn("missing plugin map for {}, reached from {}", pluggable.value(), ac.getRawType());
}
} else if (pluginRegistry.byClass().containsKey(ac.getRawType())) {
PluginMap pluginMap = pluginRegistry.byClass().get(ac.getRawType());
return new CodecTypeResolverBuilder(pluginMap, config.getTypeFactory(), pluginRegistry);
}