Example usage for com.fasterxml.jackson.databind.jsontype NamedType getName

List of usage examples for com.fasterxml.jackson.databind.jsontype NamedType getName

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind.jsontype NamedType getName.

Prototype

public String getName() 

Source Link

Usage

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());
            }//from   www .j  a  va2  s. c  om
        }
        this.extraSubTypes = Maps.unmodifiableBiMap(mutableExtraSubTypes);
    } else {
        this.extraSubTypes = ImmutableBiMap.of();
    }
    this.pluginMap = pluginMap;
}