List of usage examples for com.fasterxml.jackson.databind.jsontype NamedType hasName
public boolean hasName()
From source file:com.addthis.codec.jackson.CodecTypeIdResolver.java
public CodecTypeIdResolver(PluginMap pluginMap, JavaType baseType, TypeFactory typeFactory, Collection<NamedType> subtypes, PluginRegistry pluginRegistry) { super(baseType, typeFactory); this.pluginRegistry = pluginRegistry; if (!subtypes.isEmpty()) { BiMap<String, Class<?>> mutableExtraSubTypes = HashBiMap.create(subtypes.size()); for (NamedType namedType : subtypes) { if (namedType.hasName()) { mutableExtraSubTypes.put(namedType.getName(), namedType.getType()); }// www . jav a 2 s . c o m } this.extraSubTypes = Maps.unmodifiableBiMap(mutableExtraSubTypes); } else { this.extraSubTypes = ImmutableBiMap.of(); } this.pluginMap = pluginMap; }