List of usage examples for com.fasterxml.jackson.databind.type TypeFactory constructSpecializedType
public JavaType constructSpecializedType(JavaType paramJavaType, Class<?> paramClass)
From source file:com.addthis.codec.jackson.CodecTypeIdResolver.java
private JavaType _typeFromId(String id, TypeFactory typeFactory) { if (Strings.isNullOrEmpty(id)) { return null; }/* w w w . j av a2 s . com*/ Class<?> cls = pluginMap.getClassIfConfigured(id); if (cls == null) { cls = extraSubTypes.get(id); } try { if (cls == null) { cls = pluginMap.getClass(id); } return typeFactory.constructSpecializedType(_baseType, cls); } catch (Exception e) { String helpMessage = Plugins.classNameSuggestions(pluginRegistry, pluginMap, id); throw new IllegalArgumentException(helpMessage, e); } }